summaryrefslogtreecommitdiffstats
path: root/sys/netiso/if_eon.c
diff options
context:
space:
mode:
authoritojun <itojun@openbsd.org>2001-01-19 06:37:36 +0000
committeritojun <itojun@openbsd.org>2001-01-19 06:37:36 +0000
commitafed035cf36eb94c4b2f59029cbfeb8a6e93bfe6 (patch)
treec62b29f991f3d3eaa3a9d29954bcfe8e9cbd9064 /sys/netiso/if_eon.c
parentMore fixes from Don Beusee: (diff)
downloadwireguard-openbsd-afed035cf36eb94c4b2f59029cbfeb8a6e93bfe6.tar.xz
wireguard-openbsd-afed035cf36eb94c4b2f59029cbfeb8a6e93bfe6.zip
pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2 (UCB copyrighted).
have sys/net/route.c:rtrequest1(), which takes rt_addrinfo * as the argument. pass rt_addrinfo all the way down to rtrequest, and ifa->ifa_rtrequest. 3rd arg of ifa->ifa_rtrequest is now rt_addrinfo * instead of sockaddr * (almost noone is using it anyways). benefit: the follwoing command now works. previously we need 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. XXX is eon_rtrequest() change correct regarding to 3rd arg? eon_rtrequest() and rtrequest() were incorrect since 4.3BSD-reno, so i do not have correct answer in the source code. someone with more clue about netiso-over-ip, please help.
Diffstat (limited to 'sys/netiso/if_eon.c')
-rw-r--r--sys/netiso/if_eon.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netiso/if_eon.c b/sys/netiso/if_eon.c
index 62093ae1a35..1d6a16a1fde 100644
--- a/sys/netiso/if_eon.c
+++ b/sys/netiso/if_eon.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_eon.c,v 1.7 1999/12/08 06:50:24 itojun Exp $ */
+/* $OpenBSD: if_eon.c,v 1.8 2001/01/19 06:37:38 itojun Exp $ */
/* $NetBSD: if_eon.c,v 1.15 1996/05/09 22:29:37 scottr Exp $ */
/*-
@@ -273,14 +273,15 @@ eoniphdr(hdr, loc, ro, class, zero)
* RETURNS: nothing
*/
void
-eonrtrequest(cmd, rt, gate)
+eonrtrequest(cmd, rt, info)
int cmd;
register struct rtentry *rt;
- register struct sockaddr *gate;
+ register struct rt_addrinfo *info;
{
unsigned long zerodst = 0;
caddr_t ipaddrloc = (caddr_t) & zerodst;
register struct eon_llinfo *el = (struct eon_llinfo *) rt->rt_llinfo;
+ struct sockaddr *gate;
/*
* Common Housekeeping
@@ -308,7 +309,7 @@ eonrtrequest(cmd, rt, gate)
el->el_rt = rt;
break;
}
- if (gate || (gate = rt->rt_gateway))
+ if (info || (gate = info->rti_info[RTAX_GATEWAY])) /*XXX*/
switch (gate->sa_family) {
case AF_LINK:
#define SDL(x) ((struct sockaddr_dl *)x)