summaryrefslogtreecommitdiff
path: root/sys/net/if_gre.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-04-14 09:06:43 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-04-14 09:06:43 +0000
commit54617071ea9f9eb023d9167cbe7bfdb60e27aad3 (patch)
tree2218c953c0e2eb6e811932a00c47f0aaa1891483 /sys/net/if_gre.c
parentb2b037dc36001ccef4f7d611af54e498fb846fcc (diff)
"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_gre.c')
-rw-r--r--sys/net/if_gre.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index 3eccbf0bbcd..9047339217e 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gre.c,v 1.64 2013/10/19 14:46:30 mpi Exp $ */
+/* $OpenBSD: if_gre.c,v 1.65 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -208,10 +208,10 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
}
#ifdef DIAGNOSTIC
- if (ifp->if_rdomain != rtable_l2(m->m_pkthdr.rdomain)) {
+ if (ifp->if_rdomain != rtable_l2(m->m_pkthdr.ph_rtableid)) {
printf("%s: trying to send packet on wrong domain. "
"if %d vs. mbuf %d, AF %d\n", ifp->if_xname,
- ifp->if_rdomain, rtable_l2(m->m_pkthdr.rdomain),
+ ifp->if_rdomain, rtable_l2(m->m_pkthdr.ph_rtableid),
dst->sa_family);
}
#endif
@@ -423,7 +423,7 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
ifp->if_obytes += m->m_pkthdr.len;
- m->m_pkthdr.rdomain = sc->g_rtableid;
+ m->m_pkthdr.ph_rtableid = sc->g_rtableid;
#if NPF > 0
pf_pkt_addr_changed(m);