diff options
author | 2015-10-25 11:58:11 +0000 | |
---|---|---|
committer | 2015-10-25 11:58:11 +0000 | |
commit | dcb17c31bf7404748e80f11c1acaec2123371507 (patch) | |
tree | c478650cab74ff7f4d1a794f3afd8fdf9597587a /sys/netinet | |
parent | backout; many issues remain... (diff) | |
download | wireguard-openbsd-dcb17c31bf7404748e80f11c1acaec2123371507.tar.xz wireguard-openbsd-dcb17c31bf7404748e80f11c1acaec2123371507.zip |
Introduce if_rtrequest() the successor of ifa_rtrequest().
L2 resolution depends on the protocol (encoded in the route entry) and
an ``ifp''. Not having to care about an ``ifa'' makes our life easier
in our MP effort. Fewer dependencies between data structures implies
fewer headaches.
Discussed with bluhm@, ok claudio@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/if_ether.c | 6 | ||||
-rw-r--r-- | sys/netinet/if_ether.h | 4 | ||||
-rw-r--r-- | sys/netinet/ip_carp.c | 3 |
3 files changed, 5 insertions, 8 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 7e5e32e470e..a5967cf2463 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.c,v 1.176 2015/10/22 18:14:53 mpi Exp $ */ +/* $OpenBSD: if_ether.c,v 1.177 2015/10/25 11:58:11 mpi Exp $ */ /* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */ /* @@ -137,11 +137,10 @@ arptimer(void *arg) } void -arp_rtrequest(int req, struct rtentry *rt) +arp_rtrequest(struct ifnet *ifp, int req, struct rtentry *rt) { struct sockaddr *gate = rt->rt_gateway; struct llinfo_arp *la = (struct llinfo_arp *)rt->rt_llinfo; - struct ifnet *ifp = rt->rt_ifp; struct ifaddr *ifa; struct mbuf *m; @@ -821,7 +820,6 @@ arpproxy(struct in_addr in, unsigned int rtableid) void arp_ifinit(struct arpcom *ac, struct ifaddr *ifa) { - ifa->ifa_rtrequest = arp_rtrequest; } /* diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h index 9037a8f4085..b3aa1c0c8b9 100644 --- a/sys/netinet/if_ether.h +++ b/sys/netinet/if_ether.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.h,v 1.60 2015/09/27 16:50:40 stsp Exp $ */ +/* $OpenBSD: if_ether.h,v 1.61 2015/10/25 11:58:11 mpi Exp $ */ /* $NetBSD: if_ether.h,v 1.22 1996/05/11 13:00:00 mycroft Exp $ */ /* @@ -197,7 +197,7 @@ void arpintr(void); int arpresolve(struct ifnet *, struct rtentry *, struct mbuf *, struct sockaddr *, u_char *); void arp_ifinit(struct arpcom *, struct ifaddr *); -void arp_rtrequest(int, struct rtentry *); +void arp_rtrequest(struct ifnet *, int, struct rtentry *); int ether_addmulti(struct ifreq *, struct arpcom *); int ether_delmulti(struct ifreq *, struct arpcom *); diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 8dd1a3520a1..001be8ffc8a 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.277 2015/10/22 13:30:29 mpi Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.278 2015/10/25 11:58:11 mpi Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -2097,7 +2097,6 @@ carp_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr) switch (ifa->ifa_addr->sa_family) { case AF_INET: sc->sc_if.if_flags |= IFF_UP; - ifa->ifa_rtrequest = arp_rtrequest; error = carp_set_addr(sc, satosin(ifa->ifa_addr)); break; #ifdef INET6 |