From ecb4d3d05f89eabc8020bb6563d903164e3002a1 Mon Sep 17 00:00:00 2001 From: ru Date: Wed, 17 Oct 2001 18:07:05 +0000 Subject: Pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2. Have sys/net/route.c:rtrequest1(), which takes ``rt_addrinfo *'' as the argument. Pass rt_addrinfo all the way down to rtrequest1 and ifa->ifa_rtrequest. 3rd argument of ifa->ifa_rtrequest is now ``rt_addrinfo *'' instead of ``sockaddr *'' (almost noone is using it anyways). Benefit: the following command now works. Previously we needed two route(8) invocations, "add" then "change". # route add -inet6 default ::1 -ifp gif0 Remove unsafe typecast in rtrequest(), from ``rtentry *'' to ``sockaddr *''. It was introduced by 4.3BSD-Reno and never corrected. Obtained from: BSD/OS, NetBSD MFC after: 1 month PR: kern/28360 --- sys/net/if_faith.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/net/if_faith.c') diff --git a/sys/net/if_faith.c b/sys/net/if_faith.c index 1dac1b6..585cf1d 100644 --- a/sys/net/if_faith.c +++ b/sys/net/if_faith.c @@ -96,7 +96,7 @@ struct faith_softc { static int faithioctl __P((struct ifnet *, u_long, caddr_t)); int faithoutput __P((struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *)); -static void faithrtrequest __P((int, struct rtentry *, struct sockaddr *)); +static void faithrtrequest __P((int, struct rtentry *, struct rt_addrinfo *)); static int faithprefix __P((struct in6_addr *)); static int faithmodevent __P((module_t, int, void *)); @@ -311,10 +311,10 @@ faithoutput(ifp, m, dst, rt) /* ARGSUSED */ static void -faithrtrequest(cmd, rt, sa) +faithrtrequest(cmd, rt, info) int cmd; struct rtentry *rt; - struct sockaddr *sa; + struct rt_addrinfo *info; { if (rt) { rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu; /* for ISO */ -- cgit v1.1