summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tun.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2014-04-14 09:06:41 +0000
committermpi <mpi@openbsd.org>2014-04-14 09:06:41 +0000
commit5ee8afe39a770ad61ead39a141e8c19b968b0fdd (patch)
treeb87e5dc2add33e729fcb6ee0ec810283a367bb96 /sys/net/if_tun.c
parentSync the list of man pages with doc/crypto and doc/ssl. MLINKS will (diff)
downloadwireguard-openbsd-5ee8afe39a770ad61ead39a141e8c19b968b0fdd.tar.xz
wireguard-openbsd-5ee8afe39a770ad61ead39a141e8c19b968b0fdd.zip
"struct pkthdr" holds a routing table ID, not a routing domain one.
Avoid the confusion by using an appropriate name for the variable. Note that since routing domain IDs are a subset of the set of routing table IDs, the following idiom is correct: rtableid = rdomain But to get the routing domain ID corresponding to a given routing table ID, you must call rtable_l2(9). claudio@ likes it, ok mikeb@
Diffstat (limited to 'sys/net/if_tun.c')
-rw-r--r--sys/net/if_tun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 2f46811cd5e..6e03b8e6437 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tun.c,v 1.121 2014/03/30 21:54:48 guenther Exp $ */
+/* $OpenBSD: if_tun.c,v 1.122 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
@@ -888,7 +888,7 @@ tunwrite(dev_t dev, struct uio *uio, int ioflag)
top->m_data += sizeof(*th);
top->m_len -= sizeof(*th);
top->m_pkthdr.len -= sizeof(*th);
- top->m_pkthdr.rdomain = ifp->if_rdomain;
+ top->m_pkthdr.ph_rtableid = ifp->if_rdomain;
switch (ntohl(*th)) {
#ifdef INET