summaryrefslogtreecommitdiff
path: root/sys/netiso
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-01-19 06:37:39 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-01-19 06:37:39 +0000
commit70e4be3ea2932a4a2c3c8e85675ba6fe3eb8edcc (patch)
tree72015846dbf72703cf304b4efe000aafa7d8a2ca /sys/netiso
parent1ec03c593543ff3451fb2102f094e2e24f111e46 (diff)
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')
-rw-r--r--sys/netiso/eonvar.h4
-rw-r--r--sys/netiso/if_eon.c9
-rw-r--r--sys/netiso/iso_snpac.c8
-rw-r--r--sys/netiso/iso_var.h4
4 files changed, 13 insertions, 12 deletions
diff --git a/sys/netiso/eonvar.h b/sys/netiso/eonvar.h
index 2d0aadd4745..412d9180629 100644
--- a/sys/netiso/eonvar.h
+++ b/sys/netiso/eonvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: eonvar.h,v 1.2 1996/03/04 10:35:13 mickey Exp $ */
+/* $OpenBSD: eonvar.h,v 1.3 2001/01/19 06:37:38 itojun Exp $ */
/* $NetBSD: eonvar.h,v 1.6 1996/02/13 22:09:18 christos Exp $ */
/*-
@@ -178,7 +178,7 @@ void eonprotoinit __P((void));
void eonattach __P((void));
int eonioctl __P((struct ifnet *, u_long, caddr_t));
void eoniphdr __P((struct eon_iphdr *, caddr_t, struct route *, int, int));
-void eonrtrequest __P((int, struct rtentry *, struct sockaddr *));
+void eonrtrequest __P((int, struct rtentry *, struct rt_addrinfo *));
int eonoutput __P((struct ifnet *, struct mbuf *, struct sockaddr *,
struct rtentry *));
void eoninput __P((struct mbuf *, ...));
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)
diff --git a/sys/netiso/iso_snpac.c b/sys/netiso/iso_snpac.c
index 09cb450df73..ce97a40a6bd 100644
--- a/sys/netiso/iso_snpac.c
+++ b/sys/netiso/iso_snpac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iso_snpac.c,v 1.5 1998/04/04 02:55:55 don Exp $ */
+/* $OpenBSD: iso_snpac.c,v 1.6 2001/01/19 06:37:38 itojun Exp $ */
/* $NetBSD: iso_snpac.c,v 1.13 1996/05/07 02:45:16 thorpej Exp $ */
/*-
@@ -162,10 +162,10 @@ union sockunion {
* NOTES: This does a lot of obscure magic;
*/
void
-llc_rtrequest(req, rt, sa)
+llc_rtrequest(req, rt, info)
int req;
register struct rtentry *rt;
- struct sockaddr *sa;
+ struct rt_addrinfo *info;
{
register union sockunion *gate = (union sockunion *) rt->rt_gateway;
register struct llinfo_llc *lc = (struct llinfo_llc *) rt->rt_llinfo;
@@ -175,7 +175,7 @@ llc_rtrequest(req, rt, sa)
#ifdef ARGO_DEBUG
if (argo_debug[D_SNPA]) {
- printf("llc_rtrequest(%d, %p, %p)\n", req, rt, sa);
+ printf("llc_rtrequest(%d, %p, %p)\n", req, rt, info);
}
#endif
if (rt->rt_flags & RTF_GATEWAY)
diff --git a/sys/netiso/iso_var.h b/sys/netiso/iso_var.h
index fe533687f6b..22bd2ef39fc 100644
--- a/sys/netiso/iso_var.h
+++ b/sys/netiso/iso_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: iso_var.h,v 1.2 1996/03/04 10:35:43 mickey Exp $ */
+/* $OpenBSD: iso_var.h,v 1.3 2001/01/19 06:37:38 itojun Exp $ */
/* $NetBSD: iso_var.h,v 1.8 1996/02/13 22:10:32 christos Exp $ */
/*-
@@ -160,7 +160,7 @@ int m_datalen __P((struct mbuf *));
int m_compress __P((struct mbuf *, struct mbuf **));
/* iso_snpac.c */
-void llc_rtrequest __P((int, struct rtentry *, struct sockaddr *));
+void llc_rtrequest __P((int, struct rtentry *, struct rt_addrinfo *));
void iso_setmcasts __P((struct ifnet *, int));
int iso_snparesolve __P((struct ifnet *, struct sockaddr_iso *,
caddr_t, int *));