From owner-cvs-all Mon Oct 26 11:07:42 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA09738 for cvs-all-outgoing; Mon, 26 Oct 1998 11:07:42 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA09730; Mon, 26 Oct 1998 11:07:41 -0800 (PST) (envelope-from brian@FreeBSD.org) From: Brian Somers Received: (from brian@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id LAA18488; Mon, 26 Oct 1998 11:07:37 -0800 (PST) Date: Mon, 26 Oct 1998 11:07:37 -0800 (PST) Message-Id: <199810261907.LAA18488@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: cvs commit: src/usr.sbin/ppp command.c iface.c ppp.8 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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