From owner-freebsd-net Fri Mar 29 8:39:15 2002 Delivered-To: freebsd-net@freebsd.org Received: from cheer.mahoroba.org (flets20-089.kamome.or.jp [218.45.20.89]) by hub.freebsd.org (Postfix) with ESMTP id CE6AF37B416 for ; Fri, 29 Mar 2002 08:39:02 -0800 (PST) Received: from mille.mahoroba.org (IDENT:4LIDXcLOAx4SrTgvtbg+yjPUbiIl8mKFkkX3D0muMjubrcxtJca17WULeVe0wRVB@mille.mahoroba.org [IPv6:2001:200:301:0:202:2dff:fe0a:6bee]) (user=ume mech=CRAM-MD5 bits=0) by cheer.mahoroba.org (8.12.2/8.12.2) with ESMTP/inet6 id g2TGd09B013460 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 30 Mar 2002 01:39:00 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sat, 30 Mar 2002 01:38:59 +0900 Message-ID: From: Hajimu UMEMOTO To: freebsd-net@FreeBSD.org Subject: route add -inet6 default ::1 -ifp gif0 User-Agent: Wanderlust/2.8.1 (Something) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.2 (i386--freebsd) MULE/5.0 (=?ISO-2022-JP?B?GyRCOC1MWhsoQg==?=) X-Operating-System: FreeBSD 4.5-STABLE MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by AMaViS-perl11-milter (http://amavis.org/) Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, The commit log of http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/net/if.c.diff?r1=3D1.123&r2= =3D1.124 says: Benefit: the following command now works. Previously we needed two route(8) invocations, "add" then "change". # route add -inet6 default ::1 -ifp gif0 But, actually `route add -inet6 default ::1 -ifp gif0' doesn't work. This is because following code is in sys/net/if.c: if ( #ifdef INET6 /* XXX: for maching gif tunnel dst as routing entry gateway */ addr->sa_family !=3D AF_INET6 && #endif ifp->if_flags & IFF_POINTOPOINT) { /* * This is a bit broken as it doesn't * take into account that the remote end may * be a single node in the network we are * looking for. * The trouble is that we don't know the * netmask for the remote end. */ if (ifa->ifa_dstaddr !=3D 0 && equal(addr, ifa->ifa_dstaddr)) return (ifa); } else { The commit log of http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/net/if.c.diff?r1=3D1.13&r2=3D= 1.14 says: Added a fix for a bug which caused the wrong interface to be selected for broadcasts if point-to-point links shared the same IP address as the ethernet. The fix must be enabled with P2P_LOCALADDR_SHARE option in the kernel config file. This will someday likely be standard, but there isn't sufficient time before release to determine if there are any interoperability problems with routed and/or gated. =46rom the commit log, I think this is specific to AF_INET. So, I wish to commit following change: Index: sys/net/if.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/net/if.c,v retrieving revision 1.127 diff -u -r1.127 if.c --- sys/net/if.c 18 Jan 2002 14:33:03 -0000 1.127 +++ sys/net/if.c 29 Mar 2002 16:16:11 -0000 @@ -830,10 +830,7 @@ =20 if (ifa->ifa_addr->sa_family !=3D af) next: continue; - if ( -#ifdef INET6 /* XXX: for maching gif tunnel dst as routing entry gateway */ - addr->sa_family !=3D AF_INET6 && -#endif + if (addr->sa_family =3D=3D AF_INET && ifp->if_flags & IFF_POINTOPOINT) { /* * This is a bit broken as it doesn't Any objection? -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message