Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 2009 07:29:54 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Kip Macy <kmacy@freebsd.org>
Cc:        adrian@freebsd.org, trasz@freebsd.org, julian@elischer.org, freebsd-arch@freebsd.org
Subject:   Re: IP_NONLOCALOK improvements.
Message-ID:  <20090527052954.GC4204@garage.freebsd.pl>
In-Reply-To: <3c1674c90905262217k7a75b73fsab25c2ef93993e18@mail.gmail.com>
References:  <20090526135547.GE1491@garage.freebsd.pl> <3c1674c90905262217k7a75b73fsab25c2ef93993e18@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--z6Eq5LdranGa6ru8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, May 26, 2009 at 10:17:32PM -0700, Kip Macy wrote:
> On Tue, May 26, 2009 at 6:55 AM, Pawel Jakub Dawidek <pjd@freebsd.org> wr=
ote:
> > Now that we have IP_NONLOCALOK IP socket option (which is something I
> > need a lot for my company's stuff) I started to hack on it a bit.
> >
> > OpenBSD has SO_BINDANY SOL_SOCKET option for some time now. So first of
> > all I wanted to do the same for FreeBSD. Unfortunately we ran out of
> > space in so_options - it is u_short and all possible values are already

Actually so_options is short, not u_short, sorry about that. The size
stays the same.

> > taken. As a side note there is SO_NO_DDP option that is used only in
> > cxgb driver and nowhere else. This seems like a waste of very important
> > bit (sonner or later someone will need yet another socket option).
>=20
> Wouldn't now (before 8.0) be a good time to expand it beyond 16 bits
> rather than artificially restricting ourselves?

We can do that anyway. I'd prefer not to change it to SO_BINDANY,
because I'd like to MFC it and we won't be able to MFC so_options
enlargement. There is also an argument that this functionality more fits
as IP socket option than socket socket option.

We could do something more complex, though:
- Remove SO_NO_DDP from 7 (replace it with SO_BINDANY), as I don't see
  any users of SO_NO_DDP, at least in our tree.
- Expand so_options in HEAD and add SO_NO_DDP back.

But I'll left this for others to decide, as I might not be aware of the
consequences of so_options type change. All I know is that there are
places in the code that assume so_options is 16bit long (like
tw_so_options field in tcptw structure) and xsocket structure visible in
userland will also be changed.

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--z6Eq5LdranGa6ru8
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFKHM/QForvXbEpPzQRAlSOAJkBNK+YriySqoyuG94SQRPVzmA5qgCfXoSD
vuEoNI+S4iXcNWC7TFyDi2E=
=v97J
-----END PGP SIGNATURE-----

--z6Eq5LdranGa6ru8--



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