Date: Mon, 26 Oct 1998 11:07:37 -0800 (PST) From: Brian Somers <brian@FreeBSD.ORG> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: cvs commit: src/usr.sbin/ppp command.c iface.c ppp.8 Message-ID: <199810261907.LAA18488@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
brian 1998/10/26 11:07:37 PST Modified files: usr.sbin/ppp command.c iface.c ppp.8 Log: Fix the interface alias code. Previously, I was expecting something like tun0: flags=blah 10.0.0.1 -> 10.0.0.100 10.0.0.2 -> 10.0.0.100 10.0.0.3 -> 10.0.0.100 to DTRT, despite the SIOCAIFADDR for each new alias returning -1 & EEXIST while adding the alias anyway. In real life, once we have the second alias with the same destination, nothing will route any more ! Also, because I was ignoring EEXIST, the dynamic IP assignment code was assigning duplicate addresses ('cos it was being lied to by iface_inAdd()). Now we have tun0: flags=blah 10.0.0.1 -> 255.255.255.255 10.0.0.2 -> 10.0.0.100 10.0.0.3 -> 255.255.255.255 This works - stuff bound to 10.1 & 10.3 will be considered alive by the kernel, and when they route back to the tun device, the packets get aliased to 10.2 and go out to 10.100 (as with the original plan). We still see the EEXIST in SIOCAIFADDR, but ignore it when our destination is 255.255.255.255, assuming that the alias *was* actually added. Additionally, ``iface add'' may now optionally be given only the interface address. The mask & destination default to 255.255.255.255. Revision Changes Path 1.170 +19 -13 src/usr.sbin/ppp/command.c 1.2 +62 -12 src/usr.sbin/ppp/iface.c 1.128 +16 -2 src/usr.sbin/ppp/ppp.8 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810261907.LAA18488>