Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Feb 2001 02:24:12 +0100
From:      Thomas Moestl <tmoestl@gmx.net>
To:        current@FreeBSD.ORG
Subject:   Re: [PATCH] for linux_connect (ugly)
Message-ID:  <20010228022412.A7084@crow.dom2ip.de>
In-Reply-To: <20010228015515.A6763@crow.dom2ip.de>; from tmoestl@gmx.net on Wed, Feb 28, 2001 at 01:55:15AM %2B0100
References:  <3A6C7C25.A6101656@cup.hp.com> <Pine.BSF.4.21.0102272224580.12716-100000@levais.imp.ch> <20010228015515.A6763@crow.dom2ip.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 28, 2001 at 01:55:15AM +0100, Thomas Moestl wrote:
> On Wed, Feb 28, 2001 at 01:17:12AM +0100, Martin Blapp wrote:
> > Thomas Moestl and I tried to fix linux_connect. Most of this patch
> > is from Thomas Moestl. I did only a little part of it and testing.
> > 
> > Staroffice5.2 has been broken about one year now, and it needs
> > a fix with the same behaviour to work correctly with FreeBSD.
> > 
> > This patch should be rewritten so it can be comitted to CURRENT
> > and (IMPORTANT) to STABLE before 4.3 is out.
> > 
> > +			/*
> > +			 * Ugly kluge: some applications depend on 0 being
> > +			 * returned only the first time. Therefore, we set
> > +			 * the (otherwise invisible) SO_KNBCONN flag.
> > +			 * If it is set, return EISCONN.
> > +			 */
> > +			error = holdsock(p->p_fd, linux_args.s, &fp);
> > +			if (error)
> > +				return (error);
> > +			iconn = ((struct socket *)fp->f_data)->so_options &
> > +			    SO_KNBCONN;
> > +			((struct socket *)fp->f_data)->so_options |= SO_KNBCONN;
> > +			fdrop(fp, p);
> > +
> > +			if (iconn)
> > +			return (EISCONN);
I have forgotten to add that if we fiddle with the socket's internals
anyway, this should probably be put into the socket state. 
This really is a quick hack, but maybe it can be sanitized to be
useful.

	- thomas

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010228022412.A7084>