On Sat, Apr 02, 2011 at 10:56:06PM +1000, David Gwynne wrote: > all the things i can imagine using this for, i can do with pf features. > > ok. >
Fine with me. > On 02/04/2011, at 10:49 PM, Henning Brauer wrote: > > > lo has that link1 wankery where it kind of replies to all addresses in > > the subnet, except that it doesn't really - it is very halfbaked and > > gets in the way. unless somebody has a VERY convincing reason to keep > > this it'll be gone in a few. > > we'll be able to use the fast rb tree lookup in in_aiwithaddr after > > this. > > > > Index: sys/netinet/ip_input.c > > =================================================================== > > RCS file: /cvs/src/sys/netinet/ip_input.c,v > > retrieving revision 1.186 > > diff -u -p -r1.186 ip_input.c > > --- sys/netinet/ip_input.c 11 Feb 2011 12:16:30 -0000 1.186 > > +++ sys/netinet/ip_input.c 2 Apr 2011 12:44:12 -0000 > > @@ -688,10 +688,7 @@ in_iawithaddr(struct in_addr ina, struct > > TAILQ_FOREACH(ia, &in_ifaddr, ia_list) { > > if (ia->ia_ifp->if_rdomain != rdomain) > > continue; > > - if ((ina.s_addr == ia->ia_addr.sin_addr.s_addr) || > > - ((ia->ia_ifp->if_flags & (IFF_LOOPBACK|IFF_LINK1)) == > > - (IFF_LOOPBACK|IFF_LINK1) && > > - ia->ia_net == (ina.s_addr & ia->ia_netmask))) > > + if (ina.s_addr == ia->ia_addr.sin_addr.s_addr) > > return ia; > > /* check ancient classful too, e. g. for rarp-based netboot */ > > if (((ip_directedbcast == 0) || (m && ip_directedbcast && > > Index: share/man/man4/lo.4 > > =================================================================== > > RCS file: /cvs/src/share/man/man4/lo.4,v > > retrieving revision 1.26 > > diff -u -p -r1.26 lo.4 > > --- share/man/man4/lo.4 31 May 2007 19:19:50 -0000 1.26 > > +++ share/man/man4/lo.4 2 Apr 2011 12:44:12 -0000 > > @@ -70,33 +70,6 @@ The loopback should > > .Em never > > be configured first unless no hardware > > interfaces exist. > > -.Pp > > -Configuring a loopback interface for > > -.Xr inet 4 > > -with the > > -.Em link1 > > -flag set will make the interface answer to the whole set of > > -addresses identified as being in super-net which is specified > > -by the address and netmask. > > -Obviously you should not set the > > -.Em link1 > > -flag on interface > > -.Nm lo0 , > > -but instead use another interface like > > -.Nm lo1 . > > -.Sh EXAMPLES > > -.Bd -literal > > -# ifconfig lo1 create > > -# ifconfig lo1 inet 192.168.1.1 netmask 255.255.255.0 link1 > > -.Ed > > -.Pp > > -is equivalent to: > > -.Bd -literal > > -# ifconfig lo1 create > > -# awk 'BEGIN {for(i=1;i<255;i++) \e > > - print "ifconfig lo1 inet 192.168.1."i" netmask 255.255.255.255 alias"}'| > \e > > - sh > > -.Ed > > .Sh DIAGNOSTICS > > .Bl -diag > > .It lo%d: can't handle af%d. > > @@ -116,16 +89,8 @@ The > > .Nm > > device appeared in > > .Bx 4.2 . > > -.Pp > > -The wildcard functionality first appeared in > > -.Ox 2.3 . > > .Sh BUGS > > Previous versions of the system enabled the loopback interface > > automatically, using a non-standard Internet address (127.1). > > Use of that address is now discouraged; a reserved host address > > for the local network should be used instead. > > -.Pp > > -Care should be taken when using NAT with interfaces that have the > > -.Em link1 > > -flag set, because it may believe the packets are coming from a > > -loopback address. > > > > > > -- > > Henning Brauer, h...@bsws.de, henn...@openbsd.org > > BS Web Services, http://bsws.de > > Full-Service ISP - Secure Hosting, Mail and DNS Services > > Dedicated Servers, Rootservers, Application Hosting > -- :wq Claudio