diff options
author | ru <ru@FreeBSD.org> | 2001-10-17 18:07:05 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-10-17 18:07:05 +0000 |
commit | ecb4d3d05f89eabc8020bb6563d903164e3002a1 (patch) | |
tree | 6e9f67b95d216263dd912c61fa5f86b94ce2d728 /sys/net/if.c | |
parent | ddef7c98c51d09f80ae57f4f83e00ee5b6e3ee72 (diff) | |
download | FreeBSD-src-ecb4d3d05f89eabc8020bb6563d903164e3002a1.zip FreeBSD-src-ecb4d3d05f89eabc8020bb6563d903164e3002a1.tar.gz |
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
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index b97302d..1e3dfac 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -79,7 +79,7 @@ static void if_check(void *); static int if_findindex(struct ifnet *); static void if_qflush(struct ifqueue *); static void if_slowtimo(void *); -static void link_rtrequest(int, struct rtentry *, struct sockaddr *); +static void link_rtrequest(int, struct rtentry *, struct rt_addrinfo *); static int if_rtdel(struct radix_node *, void *); static struct if_clone *if_clone_lookup(const char *, int *); static int if_clone_list(struct if_clonereq *); @@ -943,10 +943,10 @@ done: * This should be moved to /sys/net/link.c eventually. */ static void -link_rtrequest(cmd, rt, sa) +link_rtrequest(cmd, rt, info) int cmd; register struct rtentry *rt; - struct sockaddr *sa; + struct rt_addrinfo *info; { register struct ifaddr *ifa; struct sockaddr *dst; @@ -961,7 +961,7 @@ link_rtrequest(cmd, rt, sa) rt->rt_ifa = ifa; ifa->ifa_refcnt++; if (ifa->ifa_rtrequest && ifa->ifa_rtrequest != link_rtrequest) - ifa->ifa_rtrequest(cmd, rt, sa); + ifa->ifa_rtrequest(cmd, rt, info); } } |