diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-04-14 09:06:43 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-04-14 09:06:43 +0000 |
commit | 54617071ea9f9eb023d9167cbe7bfdb60e27aad3 (patch) | |
tree | 2218c953c0e2eb6e811932a00c47f0aaa1891483 /sys/netinet/ip_gre.c | |
parent | b2b037dc36001ccef4f7d611af54e498fb846fcc (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/netinet/ip_gre.c')
-rw-r--r-- | sys/netinet/ip_gre.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c index 2b2c183a7da..1c6c464c73b 100644 --- a/sys/netinet/ip_gre.c +++ b/sys/netinet/ip_gre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_gre.c,v 1.48 2013/12/31 03:24:44 tedu Exp $ */ +/* $OpenBSD: ip_gre.c,v 1.49 2014/04/14 09:06:42 mpi Exp $ */ /* $NetBSD: ip_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */ /* @@ -118,7 +118,7 @@ gre_input2(struct mbuf *m, int hlen, u_char proto) gip = mtod(m, struct greip *); m->m_pkthdr.rcvif = &sc->sc_if; - m->m_pkthdr.rdomain = sc->sc_if.if_rdomain; + m->m_pkthdr.ph_rtableid = sc->sc_if.if_rdomain; sc->sc_if.if_ipackets++; sc->sc_if.if_ibytes += m->m_pkthdr.len; @@ -363,7 +363,7 @@ gre_lookup(struct mbuf *m, u_int8_t proto) (sc->g_src.s_addr == ip->ip_dst.s_addr) && (sc->g_proto == proto) && (rtable_l2(sc->g_rtableid) == - rtable_l2(m->m_pkthdr.rdomain)) && + rtable_l2(m->m_pkthdr.ph_rtableid)) && ((sc->sc_if.if_flags & IFF_UP) != 0)) return (sc); } |