Subject: Re: OpenVPN
To: Sanjay Shridhar <sshridha@riverstonenet.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-net
Date: 05/11/2006 12:49:11
--fUYQa+Pmc3FrFX/N
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Thu, May 11, 2006 at 10:42:40AM -0700, Sanjay Shridhar wrote:
> =20
>=20
> > -----Original Message-----
> > From: tech-net-owner@NetBSD.org=20
> > [mailto:tech-net-owner@NetBSD.org] On Behalf Of der Mouse
> > Sent: Thursday, May 11, 2006 6:52 AM
> > To: tech-net@NetBSD.org
> > Subject: Re: OpenVPN
> >=20
> > >> There is no nonportability here unless they care about portability=
=20
> > >> across the silent API change (which is unlikely) or unless=20
> > Linux does=20
> > >> it gratuitously differently (which is reasonably likely, actually).
> > > The struct msghdr and function arguments are identical. However,=20
> > > OpenVPN does use a flag not defined in NetBSD:
> >=20
> > > MSG_NOSIGNAL
> > > Requests not to send SIGPIPE on errors on stream oriented
> > > sockets when the other end breaks the connection. The EPIPE
> > > error is still returned.
> >=20
> > > That doesn't look like a showstopper...
> >=20
> > Depends on how OpenVPN uses it. But, looking at the code for=20
> > SIGPIPE generation, it looks as though this would be dead=20
> > easy to add to NetBSD. sendit(), in uipc_syscalls.c, is the=20
> > only place that I think needs to be touched:
> >=20
> > - if (error =3D=3D EPIPE)
> > - psignal(p, SIGPIPE);
> > + if ((error =3D=3D EPIPE) && !(flags & MSG_NOSIGNAL))
> > + psignal(p, SIGPIPE);
>=20
> If you do this, you would have version compatibility issues. Maybe a nice
> additional feature, but increases the burden on the app space to be
> compatible between versions that do and don't support this.
Huh?
How would adding support for MSG_NOSIGNAL to NetBSD cause compat issues?=20
OpenVPN isn't compatible with NetBSD without this; the app isn't burdened=
=20
with supporting NetBSD w/o this feature.
This feature is also small-enough that it could probably get pulled into=20
the 3.X branch and probably the 2.X branch too.
Take care,
Bill
--fUYQa+Pmc3FrFX/N
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iD8DBQFEY5U3Wz+3JHUci9cRAsiGAJ0VsMPvDNO4O5BV1jzgV5v9yREQ5QCfUNIg
4ZlQZzRpa8eglFHeiPcv5Ac=
=Q1aZ
-----END PGP SIGNATURE-----
--fUYQa+Pmc3FrFX/N--