summaryrefslogtreecommitdiff
path: root/sys/netinet/raw_ip.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/netinet/raw_ip.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/netinet/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 3f796d5f29e..6e2de4c3ef6 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip.c,v 1.70 2014/04/07 10:04:17 mpi Exp $ */
+/* $OpenBSD: raw_ip.c,v 1.71 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */
/*
@@ -135,7 +135,7 @@ rip_input(struct mbuf *m, ...)
continue;
#endif
if (rtable_l2(inp->inp_rtableid) !=
- rtable_l2(m->m_pkthdr.rdomain))
+ rtable_l2(m->m_pkthdr.ph_rtableid))
continue;
if (inp->inp_ip.ip_p && inp->inp_ip.ip_p != ip->ip_p)
@@ -274,8 +274,8 @@ rip_output(struct mbuf *m, ...)
* ip_output should be guarded against v6/v4 problems.
*/
#endif
- /* force routing domain */
- m->m_pkthdr.rdomain = inp->inp_rtableid;
+ /* force routing table */
+ m->m_pkthdr.ph_rtableid = inp->inp_rtableid;
error = ip_output(m, inp->inp_options, &inp->inp_route, flags,
inp->inp_moptions, inp);