summaryrefslogtreecommitdiff
path: root/sys/net/if_tun.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-10-25 11:58:12 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-10-25 11:58:12 +0000
commitc42a1a9fb10bbbacabbeea8312e186a426793c81 (patch)
treef8e6a39812653e58d7cbb89fffd2c26cfa2c0c8a /sys/net/if_tun.c
parentd7c02826bd0518fa3ad0c9ac4f00ba148683d42c (diff)
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/net/if_tun.c')
-rw-r--r--sys/net/if_tun.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index d52dc4bb2b0..84041b75d64 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tun.c,v 1.157 2015/10/24 04:12:24 dlg Exp $ */
+/* $OpenBSD: if_tun.c,v 1.158 2015/10/25 11:58:11 mpi Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
@@ -219,6 +219,7 @@ tun_create(struct if_clone *ifc, int unit, int flags)
ifp->if_flags = IFF_POINTOPOINT;
ifp->if_type = IFT_TUNNEL;
ifp->if_hdrlen = sizeof(u_int32_t);
+ ifp->if_rtrequest = p2p_rtrequest;
if_attach(ifp);
if_alloc_sadl(ifp);
@@ -506,8 +507,6 @@ tun_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
default:
break;
}
- } else {
- ifa->ifa_rtrequest = p2p_rtrequest;
}
break;
case SIOCSIFDSTADDR: