summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/uipc_mbuf.c6
-rw-r--r--sys/net/bpf.c4
-rw-r--r--sys/net/if_bridge.c8
-rw-r--r--sys/net/if_ethersubr.c12
-rw-r--r--sys/net/if_gre.c8
-rw-r--r--sys/net/if_mpe.c16
-rw-r--r--sys/net/if_pflow.c4
-rw-r--r--sys/net/if_pfsync.c4
-rw-r--r--sys/net/if_ppp.c10
-rw-r--r--sys/net/if_pppoe.c4
-rw-r--r--sys/net/if_sl.c10
-rw-r--r--sys/net/if_spppsubr.c8
-rw-r--r--sys/net/if_tun.c4
-rw-r--r--sys/net/if_vxlan.c6
-rw-r--r--sys/net/pf.c40
-rw-r--r--sys/netinet/if_ether.c8
-rw-r--r--sys/netinet/in_gif.c12
-rw-r--r--sys/netinet/ip_carp.c6
-rw-r--r--sys/netinet/ip_divert.c6
-rw-r--r--sys/netinet/ip_ether.c6
-rw-r--r--sys/netinet/ip_gre.c6
-rw-r--r--sys/netinet/ip_icmp.c18
-rw-r--r--sys/netinet/ip_input.c24
-rw-r--r--sys/netinet/ip_ipip.c4
-rw-r--r--sys/netinet/ip_ipsp.c6
-rw-r--r--sys/netinet/ip_output.c22
-rw-r--r--sys/netinet/ip_spd.c4
-rw-r--r--sys/netinet/ipsec_input.c4
-rw-r--r--sys/netinet/raw_ip.c8
-rw-r--r--sys/netinet/tcp_input.c22
-rw-r--r--sys/netinet/tcp_output.c6
-rw-r--r--sys/netinet/tcp_subr.c8
-rw-r--r--sys/netinet/udp_usrreq.c21
-rw-r--r--sys/netinet6/frag6.c4
-rw-r--r--sys/netinet6/icmp6.c18
-rw-r--r--sys/netinet6/ip6_divert.c7
-rw-r--r--sys/netinet6/ip6_forward.c6
-rw-r--r--sys/netinet6/ip6_input.c4
-rw-r--r--sys/netinet6/ip6_output.c10
-rw-r--r--sys/netinet6/mld6.c4
-rw-r--r--sys/netinet6/nd6.c6
-rw-r--r--sys/netinet6/nd6_nbr.c12
-rw-r--r--sys/netinet6/raw_ip6.c6
-rw-r--r--sys/netinet6/udp6_output.c6
-rw-r--r--sys/sys/mbuf.h4
45 files changed, 214 insertions, 208 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index d6fb112110e..dfa456b1b2b 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.180 2014/03/28 17:57:11 mpi Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.181 2014/04/14 09:06:41 mpi Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -1362,8 +1362,8 @@ m_print(void *v,
m->m_pkthdr.tagsset, MTAG_BITS);
(*pr)("m_pkthdr.csum_flags: %hb\n",
m->m_pkthdr.csum_flags, MCS_BITS);
- (*pr)("m_pkthdr.ether_vtag: %hu\tm_ptkhdr.rdomain: %u\n",
- m->m_pkthdr.ether_vtag, m->m_pkthdr.rdomain);
+ (*pr)("m_pkthdr.ether_vtag: %hu\tm_ptkhdr.ph_rtableid: %u\n",
+ m->m_pkthdr.ether_vtag, m->m_pkthdr.ph_rtableid);
(*pr)("m_pkthdr.pf.hdr: %p\n",
m->m_pkthdr.pf.hdr);
(*pr)("m_pkthdr.pf.statekey: %p\tm_pkthdr.pf.inp %p\n",
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index d917d3d9db0..9305f1afc3a 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.91 2014/03/30 21:54:48 guenther Exp $ */
+/* $OpenBSD: bpf.c,v 1.92 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
@@ -543,7 +543,7 @@ bpfwrite(dev_t dev, struct uio *uio, int ioflag)
return (EMSGSIZE);
}
- m->m_pkthdr.rdomain = ifp->if_rdomain;
+ m->m_pkthdr.ph_rtableid = ifp->if_rdomain;
if (d->bd_hdrcmplt)
dst.ss_family = pseudo_AF_HDRCMPLT;
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 1b8ddf341c1..a3f365f58b4 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bridge.c,v 1.221 2014/01/24 18:54:58 henning Exp $ */
+/* $OpenBSD: if_bridge.c,v 1.222 2014/04/14 09:06:42 mpi Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
@@ -1394,7 +1394,7 @@ bridge_input(struct ifnet *ifp, struct ether_header *eh, struct mbuf *m)
}
if (ifl != NULL) {
m->m_pkthdr.rcvif = ifl->ifp;
- m->m_pkthdr.rdomain = ifl->ifp->if_rdomain;
+ m->m_pkthdr.ph_rtableid = ifl->ifp->if_rdomain;
#if NBPFILTER > 0
if (ifl->ifp->if_bpf)
bpf_mtap(ifl->ifp->if_bpf, m,
@@ -1457,7 +1457,7 @@ bridge_input(struct ifnet *ifp, struct ether_header *eh, struct mbuf *m)
sc->sc_if.if_ibytes += ETHER_HDR_LEN + m->m_pkthdr.len;
m->m_pkthdr.rcvif = ifl->ifp;
- m->m_pkthdr.rdomain = ifl->ifp->if_rdomain;
+ m->m_pkthdr.ph_rtableid = ifl->ifp->if_rdomain;
if (ifp->if_type == IFT_GIF) {
m->m_flags |= M_PROTO1;
ether_input(ifl->ifp, eh, m);
@@ -1632,7 +1632,7 @@ bridge_localbroadcast(struct bridge_softc *sc, struct ifnet *ifp,
}
/* fixup header a bit */
m1->m_pkthdr.rcvif = ifp;
- m1->m_pkthdr.rdomain = ifp->if_rdomain;
+ m1->m_pkthdr.ph_rtableid = ifp->if_rdomain;
m1->m_flags |= M_PROTO1;
#if NBPFILTER > 0
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 9b283fbadb1..330d87d0c0e 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.164 2014/03/26 15:13:59 mpi Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.165 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -211,10 +211,10 @@ ether_output(struct ifnet *ifp0, struct mbuf *m0, struct sockaddr *dst,
struct ifnet *ifp = ifp0;
#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
@@ -242,7 +242,7 @@ ether_output(struct ifnet *ifp0, struct mbuf *m0, struct sockaddr *dst,
if ((rt = rt0) != NULL) {
if ((rt->rt_flags & RTF_UP) == 0) {
if ((rt0 = rt = rtalloc1(dst, RT_REPORT,
- m->m_pkthdr.rdomain)) != NULL)
+ m->m_pkthdr.ph_rtableid)) != NULL)
rt->rt_refcnt--;
else
senderr(EHOSTUNREACH);
@@ -454,8 +454,8 @@ ether_input(struct ifnet *ifp0, struct ether_header *eh, struct mbuf *m)
m_cluncount(m, 1);
- /* mark incoming routing domain */
- m->m_pkthdr.rdomain = ifp->if_rdomain;
+ /* mark incoming routing table */
+ m->m_pkthdr.ph_rtableid = ifp->if_rdomain;
if (eh == NULL) {
eh = mtod(m, struct ether_header *);
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);
diff --git a/sys/net/if_mpe.c b/sys/net/if_mpe.c
index 9270e7beeb3..bce4c49dd76 100644
--- a/sys/net/if_mpe.c
+++ b/sys/net/if_mpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mpe.c,v 1.32 2013/10/24 11:31:43 mpi Exp $ */
+/* $OpenBSD: if_mpe.c,v 1.33 2014/04/14 09:06:42 mpi Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -208,15 +208,15 @@ mpeoutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
u_int8_t op = 0;
#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\n", ifp->if_xname,
- ifp->if_rdomain, rtable_l2(m->m_pkthdr.rdomain));
+ ifp->if_rdomain, rtable_l2(m->m_pkthdr.ph_rtableid));
}
#endif
m->m_pkthdr.rcvif = ifp;
/* XXX assumes MPLS is always in rdomain 0 */
- m->m_pkthdr.rdomain = 0;
+ m->m_pkthdr.ph_rtableid = 0;
error = 0;
switch (dst->sa_family) {
@@ -394,9 +394,9 @@ mpe_input(struct mbuf *m, struct ifnet *ifp, struct sockaddr_mpls *smpls,
ip->ip_sum = in_cksum(m, hlen);
}
- /* new receive if and move into correct rdomain */
+ /* new receive if and move into correct rtable */
m->m_pkthdr.rcvif = ifp;
- m->m_pkthdr.rdomain = ifp->if_rdomain;
+ m->m_pkthdr.ph_rtableid = ifp->if_rdomain;
#if NBPFILTER > 0
if (ifp && ifp->if_bpf)
@@ -429,9 +429,9 @@ mpe_input6(struct mbuf *m, struct ifnet *ifp, struct sockaddr_mpls *smpls,
ip6hdr->ip6_hlim = ttl;
}
- /* new receive if and move into correct rdomain */
+ /* new receive if and move into correct rtable */
m->m_pkthdr.rcvif = ifp;
- m->m_pkthdr.rdomain = ifp->if_rdomain;
+ m->m_pkthdr.ph_rtableid = ifp->if_rdomain;
#if NBPFILTER > 0
if (ifp && ifp->if_bpf)
diff --git a/sys/net/if_pflow.c b/sys/net/if_pflow.c
index 3eb2b7b4061..d761869f391 100644
--- a/sys/net/if_pflow.c
+++ b/sys/net/if_pflow.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pflow.c,v 1.41 2014/03/29 11:26:03 florian Exp $ */
+/* $OpenBSD: if_pflow.c,v 1.42 2014/04/14 09:06:42 mpi Exp $ */
/*
* Copyright (c) 2011 Florian Obser <florian@narrans.de>
@@ -1105,7 +1105,7 @@ pflow_sendout_mbuf(struct pflow_softc *sc, struct mbuf *m)
ui->ui_ulen = htons(sizeof(struct udphdr) + len);
ui->ui_sum = 0;
m->m_pkthdr.csum_flags |= M_UDP_CSUM_OUT;
- m->m_pkthdr.rdomain = sc->sc_if.if_rdomain;
+ m->m_pkthdr.ph_rtableid = sc->sc_if.if_rdomain;
ip = (struct ip *)ui;
ip->ip_v = IPVERSION;
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c
index 19ba6c77fe2..05a75f9256e 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pfsync.c,v 1.204 2013/11/18 21:16:55 chl Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.205 2014/04/14 09:06:42 mpi Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -1683,7 +1683,7 @@ pfsync_sendout(void)
sc->sc_if.if_opackets++;
sc->sc_if.if_obytes += m->m_pkthdr.len;
- m->m_pkthdr.rdomain = sc->sc_if.if_rdomain;
+ m->m_pkthdr.ph_rtableid = sc->sc_if.if_rdomain;
if (ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL) == 0)
pfsyncstats.pfsyncs_opackets++;
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index 6e6c421189d..92fc9f7304a 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ppp.c,v 1.71 2013/10/23 15:12:42 mpi Exp $ */
+/* $OpenBSD: if_ppp.c,v 1.72 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */
/*
@@ -694,10 +694,10 @@ pppoutput(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
}
#ifdef DIAGNOSTIC
- if (ifp->if_rdomain != rtable_l2(m0->m_pkthdr.rdomain)) {
+ if (ifp->if_rdomain != rtable_l2(m0->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(m0->m_pkthdr.rdomain), dst->sa_family);
+ rtable_l2(m0->m_pkthdr.ph_rtableid), dst->sa_family);
}
#endif
@@ -1429,8 +1429,8 @@ ppp_inproc(struct ppp_softc *sc, struct mbuf *m)
m->m_pkthdr.len = ilen;
m->m_pkthdr.rcvif = ifp;
- /* mark incoming routing domain */
- m->m_pkthdr.rdomain = ifp->if_rdomain;
+ /* mark incoming routing table */
+ m->m_pkthdr.ph_rtableid = ifp->if_rdomain;
if ((proto & 0x8000) == 0) {
#if NBPFILTER > 0
diff --git a/sys/net/if_pppoe.c b/sys/net/if_pppoe.c
index 7991871a790..54a3ec8ee62 100644
--- a/sys/net/if_pppoe.c
+++ b/sys/net/if_pppoe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pppoe.c,v 1.37 2013/04/10 08:50:59 mpi Exp $ */
+/* $OpenBSD: if_pppoe.c,v 1.38 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: if_pppoe.c,v 1.51 2003/11/28 08:56:48 keihan Exp $ */
/*
@@ -898,7 +898,7 @@ pppoe_output(struct pppoe_softc *sc, struct mbuf *m)
m->m_flags &= ~(M_BCAST|M_MCAST);
/* encapsulated packet is forced into rdomain of physical interface */
- m->m_pkthdr.rdomain = sc->sc_eth_if->if_rdomain;
+ m->m_pkthdr.ph_rtableid = sc->sc_eth_if->if_rdomain;
sc->sc_sppp.pp_if.if_opackets++;
return (sc->sc_eth_if->if_output(sc->sc_eth_if, m, &dst, NULL));
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index a57aa224d6e..48a743ca31d 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sl.c,v 1.50 2013/10/23 15:12:42 mpi Exp $ */
+/* $OpenBSD: if_sl.c,v 1.51 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: if_sl.c,v 1.39.4.1 1996/06/02 16:26:31 thorpej Exp $ */
/*
@@ -414,10 +414,10 @@ sloutput(ifp, m, dst, rtp)
}
#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
@@ -819,8 +819,8 @@ slinput(c, tp)
if (m == NULL)
goto error;
- /* mark incoming routing domain */
- m->m_pkthdr.rdomain = sc->sc_if.if_rdomain;
+ /* mark incoming routing table */
+ m->m_pkthdr.ph_rtableid = sc->sc_if.if_rdomain;
#if NBPFILTER > 0
if (sc->sc_bpf) {
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index 331fea0b287..d452fd22645 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_spppsubr.c,v 1.119 2014/04/03 06:06:56 yasuoka Exp $ */
+/* $OpenBSD: if_spppsubr.c,v 1.120 2014/04/14 09:06:42 mpi Exp $ */
/*
* Synchronous PPP/Cisco link level subroutines.
* Keepalive protocol implemented in both Cisco and PPP modes.
@@ -474,7 +474,7 @@ sppp_input(struct ifnet *ifp, struct mbuf *m)
}
/* mark incoming routing domain */
- m->m_pkthdr.rdomain = ifp->if_rdomain;
+ m->m_pkthdr.ph_rtableid = ifp->if_rdomain;
if (sp->pp_flags & PP_NOFRAMING) {
m_copydata(m, 0, sizeof(ht.protocol), (caddr_t)&ht.protocol);
@@ -650,10 +650,10 @@ sppp_output(struct ifnet *ifp, struct mbuf *m,
u_int16_t protocol;
#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
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
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
index 262baa88e7f..860b6886767 100644
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vxlan.c,v 1.11 2014/04/11 08:44:37 mpi Exp $ */
+/* $OpenBSD: if_vxlan.c,v 1.12 2014/04/14 09:06:42 mpi Exp $ */
/*
* Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org>
@@ -508,7 +508,7 @@ vxlan_lookup(struct mbuf *m, struct udphdr *uh, int iphlen,
LIST_FOREACH(sc, &vxlan_tagh[VXLAN_TAGHASH(vni)], sc_entry) {
if ((uh->uh_dport == sc->sc_dstport) &&
vni == sc->sc_vnetid &&
- sc->sc_rdomain == rtable_l2(m->m_pkthdr.rdomain))
+ sc->sc_rdomain == rtable_l2(m->m_pkthdr.ph_rtableid))
goto found;
}
@@ -628,7 +628,7 @@ vxlan_output(struct ifnet *ifp, struct mbuf *m)
ifp->if_opackets++;
ifp->if_obytes += m->m_pkthdr.len;
- m->m_pkthdr.rdomain = sc->sc_rdomain;
+ m->m_pkthdr.ph_rtableid = sc->sc_rdomain;
#if NPF > 0
pf_pkt_addr_changed(m);
diff --git a/sys/net/pf.c b/sys/net/pf.c
index c1dfaf846b8..c2a1fa554dc 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.870 2014/03/10 17:27:06 jca Exp $ */
+/* $OpenBSD: pf.c,v 1.871 2014/04/14 09:06:42 mpi Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -2363,7 +2363,7 @@ pf_send_tcp(const struct pf_rule *r, sa_family_t af,
if (tag)
m->m_pkthdr.pf.flags |= PF_TAG_GENERATED;
m->m_pkthdr.pf.tag = rtag;
- m->m_pkthdr.rdomain = rdom;
+ m->m_pkthdr.ph_rtableid = rdom;
if (r && (r->scrub_flags & PFSTATE_SETPRIO))
m->m_pkthdr.pf.prio = r->set_prio[0];
@@ -2487,7 +2487,7 @@ pf_send_icmp(struct mbuf *m, u_int8_t type, u_int8_t code, sa_family_t af,
return;
m0->m_pkthdr.pf.flags |= PF_TAG_GENERATED;
- m0->m_pkthdr.rdomain = rdomain;
+ m0->m_pkthdr.ph_rtableid = rdomain;
if (r && (r->scrub_flags & PFSTATE_SETPRIO))
m0->m_pkthdr.pf.prio = r->set_prio[0];
@@ -2688,7 +2688,7 @@ pf_tag_packet(struct mbuf *m, int tag, int rtableid)
if (tag > 0)
m->m_pkthdr.pf.tag = tag;
if (rtableid >= 0)
- m->m_pkthdr.rdomain = rtableid;
+ m->m_pkthdr.ph_rtableid = rtableid;
}
void
@@ -4466,7 +4466,7 @@ pf_test_state(struct pf_pdesc *pd, struct pf_state **state, u_short *reason)
}
#endif /* INET && INET6 */
- pd->m->m_pkthdr.rdomain = nk->rdomain;
+ pd->m->m_pkthdr.ph_rtableid = nk->rdomain;
copyback = 1;
}
@@ -4593,7 +4593,7 @@ pf_test_state_icmp(struct pf_pdesc *pd, struct pf_state **state,
if (pd->rdomain != nk->rdomain)
pd->destchg = 1;
- pd->m->m_pkthdr.rdomain = nk->rdomain;
+ pd->m->m_pkthdr.ph_rtableid = nk->rdomain;
switch (pd->af) {
#ifdef INET
@@ -4883,7 +4883,8 @@ pf_test_state_icmp(struct pf_pdesc *pd, struct pf_state **state,
nk->af);
m_copyback(pd2.m, pd2.off, 8, &th,
M_NOWAIT);
- pd->m->m_pkthdr.rdomain = nk->rdomain;
+ pd->m->m_pkthdr.ph_rtableid =
+ nk->rdomain;
pd->destchg = 1;
PF_ACPY(&pd->nsaddr,
&nk->addr[pd2.sidx], nk->af);
@@ -4904,7 +4905,7 @@ pf_test_state_icmp(struct pf_pdesc *pd, struct pf_state **state,
if (PF_ANEQ(pd2.dst, &nk->addr[pd2.didx],
pd2.af) || pd2.rdomain != nk->rdomain)
pd->destchg = 1;
- pd->m->m_pkthdr.rdomain = nk->rdomain;
+ pd->m->m_pkthdr.ph_rtableid = nk->rdomain;
if (PF_ANEQ(pd2.dst,
&nk->addr[pd2.didx], pd2.af) ||
@@ -4999,7 +5000,8 @@ pf_test_state_icmp(struct pf_pdesc *pd, struct pf_state **state,
nk->af);
m_copyback(pd2.m, pd2.off, sizeof(uh),
&uh, M_NOWAIT);
- pd->m->m_pkthdr.rdomain = nk->rdomain;
+ pd->m->m_pkthdr.ph_rtableid =
+ nk->rdomain;
pd->destchg = 1;
PF_ACPY(&pd->nsaddr,
&nk->addr[pd2.sidx], nk->af);
@@ -5021,7 +5023,7 @@ pf_test_state_icmp(struct pf_pdesc *pd, struct pf_state **state,
if (PF_ANEQ(pd2.dst, &nk->addr[pd2.didx],
pd2.af) || pd2.rdomain != nk->rdomain)
pd->destchg = 1;
- pd->m->m_pkthdr.rdomain = nk->rdomain;
+ pd->m->m_pkthdr.ph_rtableid = nk->rdomain;
if (PF_ANEQ(pd2.dst,
&nk->addr[pd2.didx], pd2.af) ||
@@ -5121,7 +5123,8 @@ pf_test_state_icmp(struct pf_pdesc *pd, struct pf_state **state,
iih.icmp_id = nk->port[iidx];
m_copyback(pd2.m, pd2.off, ICMP_MINLEN,
&iih, M_NOWAIT);
- pd->m->m_pkthdr.rdomain = nk->rdomain;
+ pd->m->m_pkthdr.ph_rtableid =
+ nk->rdomain;
pd->destchg = 1;
PF_ACPY(&pd->nsaddr,
&nk->addr[pd2.sidx], nk->af);
@@ -5146,7 +5149,7 @@ pf_test_state_icmp(struct pf_pdesc *pd, struct pf_state **state,
if (PF_ANEQ(pd2.dst, &nk->addr[pd2.didx],
pd2.af) || pd2.rdomain != nk->rdomain)
pd->destchg = 1;
- pd->m->m_pkthdr.rdomain = nk->rdomain;
+ pd->m->m_pkthdr.ph_rtableid = nk->rdomain;
if (PF_ANEQ(pd2.dst,
&nk->addr[pd2.didx], pd2.af))
@@ -5239,7 +5242,8 @@ pf_test_state_icmp(struct pf_pdesc *pd, struct pf_state **state,
m_copyback(pd2.m, pd2.off,
sizeof(struct icmp6_hdr), &iih,
M_NOWAIT);
- pd->m->m_pkthdr.rdomain = nk->rdomain;
+ pd->m->m_pkthdr.ph_rtableid =
+ nk->rdomain;
pd->destchg = 1;
PF_ACPY(&pd->nsaddr,
&nk->addr[pd2.sidx], nk->af);
@@ -5267,7 +5271,7 @@ pf_test_state_icmp(struct pf_pdesc *pd, struct pf_state **state,
if (PF_ANEQ(pd2.dst, &nk->addr[pd2.didx],
pd2.af) || pd2.rdomain != nk->rdomain)
pd->destchg = 1;
- pd->m->m_pkthdr.rdomain = nk->rdomain;
+ pd->m->m_pkthdr.ph_rtableid = nk->rdomain;
if (PF_ANEQ(pd2.dst,
&nk->addr[pd2.didx], pd2.af))
@@ -5310,7 +5314,7 @@ pf_test_state_icmp(struct pf_pdesc *pd, struct pf_state **state,
if (PF_ANEQ(pd2.dst, &nk->addr[pd2.didx],
pd2.af) || pd2.rdomain != nk->rdomain)
pd->destchg = 1;
- pd->m->m_pkthdr.rdomain = nk->rdomain;
+ pd->m->m_pkthdr.ph_rtableid = nk->rdomain;
if (PF_ANEQ(pd2.dst,
&nk->addr[pd2.didx], pd2.af))
@@ -5583,7 +5587,7 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp,
dst->sin_family = AF_INET;
dst->sin_len = sizeof(*dst);
dst->sin_addr = ip->ip_dst;
- ro->ro_tableid = m0->m_pkthdr.rdomain;
+ ro->ro_tableid = m0->m_pkthdr.ph_rtableid;
if (!r->rt) {
rtalloc(ro);
@@ -5758,7 +5762,7 @@ pf_route6(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp,
dst->sin6_family = AF_INET6;
dst->sin6_len = sizeof(*dst);
dst->sin6_addr = ip6->ip6_dst;
- ro->ro_tableid = m0->m_pkthdr.rdomain;
+ ro->ro_tableid = m0->m_pkthdr.ph_rtableid;
if (!r->rt) {
m0->m_pkthdr.pf.flags |= PF_TAG_GENERATED;
@@ -6155,7 +6159,7 @@ pf_setup_pdesc(struct pf_pdesc *pd, void *pdhdrs, sa_family_t af, int dir,
pd->sidx = (dir == PF_IN) ? 0 : 1;
pd->didx = (dir == PF_IN) ? 1 : 0;
pd->af = pd->naf = af;
- pd->rdomain = rtable_l2(pd->m->m_pkthdr.rdomain);
+ pd->rdomain = rtable_l2(pd->m->m_pkthdr.ph_rtableid);
switch (pd->af) {
#ifdef INET
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index d645e7540b5..4286eaee5a9 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.c,v 1.124 2014/04/10 14:36:25 mikeb Exp $ */
+/* $OpenBSD: if_ether.c,v 1.125 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
@@ -303,7 +303,7 @@ arprequest(struct ifnet *ifp, u_int32_t *sip, u_int32_t *tip, u_int8_t *enaddr)
return;
m->m_len = sizeof(*ea);
m->m_pkthdr.len = sizeof(*ea);
- m->m_pkthdr.rdomain = ifp->if_rdomain;
+ m->m_pkthdr.ph_rtableid = ifp->if_rdomain;
MH_ALIGN(m, sizeof(*ea));
ea = mtod(m, struct ether_arp *);
eh = (struct ether_header *)sa.sa_data;
@@ -630,7 +630,7 @@ in_arpinput(struct mbuf *m)
goto reply;
}
la = arplookup(isaddr.s_addr, itaddr.s_addr == myaddr.s_addr, 0,
- rtable_l2(m->m_pkthdr.rdomain));
+ rtable_l2(m->m_pkthdr.ph_rtableid));
if (la && (rt = la->la_rt) && (sdl = SDL(rt->rt_gateway))) {
if (sdl->sdl_alen) {
if (memcmp(ea->arp_sha, LLADDR(sdl), sdl->sdl_alen)) {
@@ -729,7 +729,7 @@ out:
memcpy(ea->arp_sha, enaddr, sizeof(ea->arp_sha));
} else {
la = arplookup(itaddr.s_addr, 0, SIN_PROXY,
- rtable_l2(m->m_pkthdr.rdomain));
+ rtable_l2(m->m_pkthdr.ph_rtableid));
if (la == 0)
goto out;
rt = la->la_rt;
diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c
index 0a36e50d098..9e3e181cd6a 100644
--- a/sys/netinet/in_gif.c
+++ b/sys/netinet/in_gif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_gif.c,v 1.39 2011/06/19 17:55:37 jsg Exp $ */
+/* $OpenBSD: in_gif.c,v 1.40 2014/04/14 09:06:42 mpi Exp $ */
/* $KAME: in_gif.c,v 1.50 2001/01/22 07:27:16 itojun Exp $ */
/*
@@ -81,10 +81,10 @@ in_gif_output(struct ifnet *ifp, int family, struct mbuf **m0)
}
#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),
family);
}
#endif
@@ -145,7 +145,7 @@ in_gif_output(struct ifnet *ifp, int family, struct mbuf **m0)
m = *m0;
- m->m_pkthdr.rdomain = sc->gif_rtableid;
+ m->m_pkthdr.ph_rtableid = sc->gif_rtableid;
#if NPF > 0
pf_pkt_addr_changed(m);
#endif
@@ -179,7 +179,7 @@ in_gif_input(struct mbuf *m, ...)
sc->gif_psrc->sa_family != AF_INET ||
sc->gif_pdst->sa_family != AF_INET ||
rtable_l2(sc->gif_rtableid) !=
- rtable_l2(m->m_pkthdr.rdomain)) {
+ rtable_l2(m->m_pkthdr.ph_rtableid)) {
continue;
}
@@ -195,7 +195,7 @@ in_gif_input(struct mbuf *m, ...)
if (gifp) {
m->m_pkthdr.rcvif = gifp;
- m->m_pkthdr.rdomain = gifp->if_rdomain;
+ m->m_pkthdr.ph_rtableid = gifp->if_rdomain;
gifp->if_ipackets++;
gifp->if_ibytes += m->m_pkthdr.len;
/* We have a configured GIF */
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 7d9ad85434d..1b95591028b 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.c,v 1.225 2014/03/27 10:39:23 mpi Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.226 2014/04/14 09:06:42 mpi Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -1133,7 +1133,7 @@ carp_send_ad(void *v)
len = sizeof(*ip) + sizeof(ch);
m->m_pkthdr.len = len;
m->m_pkthdr.rcvif = NULL;
- m->m_pkthdr.rdomain = sc->sc_if.if_rdomain;
+ m->m_pkthdr.ph_rtableid = sc->sc_if.if_rdomain;
m->m_pkthdr.pf.prio = CARP_IFQ_PRIO;
m->m_len = len;
MH_ALIGN(m, m->m_len);
@@ -1225,7 +1225,7 @@ carp_send_ad(void *v)
m->m_pkthdr.len = len;
m->m_pkthdr.rcvif = NULL;
m->m_pkthdr.pf.prio = CARP_IFQ_PRIO;
- m->m_pkthdr.rdomain = sc->sc_if.if_rdomain;
+ m->m_pkthdr.ph_rtableid = sc->sc_if.if_rdomain;
m->m_len = len;
MH_ALIGN(m, m->m_len);
m->m_flags |= M_MCAST;
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index d29a925c6b7..4a1ab47f26b 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_divert.c,v 1.19 2014/04/07 10:04:17 mpi Exp $ */
+/* $OpenBSD: ip_divert.c,v 1.20 2014/04/14 09:06:42 mpi Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -100,7 +100,7 @@ divert_output(struct mbuf *m, ...)
m->m_pkthdr.rcvif = NULL;
m->m_nextpkt = NULL;
- m->m_pkthdr.rdomain = inp->inp_rtableid;
+ m->m_pkthdr.ph_rtableid = inp->inp_rtableid;
if (control)
m_freem(control);
@@ -166,7 +166,7 @@ divert_output(struct mbuf *m, ...)
if (sin->sin_addr.s_addr != INADDR_ANY) {
ipaddr.sin_addr = sin->sin_addr;
- ifa = ifa_ifwithaddr(sintosa(&ipaddr), m->m_pkthdr.rdomain);
+ ifa = ifa_ifwithaddr(sintosa(&ipaddr), m->m_pkthdr.ph_rtableid);
if (ifa == NULL) {
error = EADDRNOTAVAIL;
goto fail;
diff --git a/sys/netinet/ip_ether.c b/sys/netinet/ip_ether.c
index c8e745fbd83..5ad8a94ec8b 100644
--- a/sys/netinet/ip_ether.c
+++ b/sys/netinet/ip_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ether.c,v 1.65 2014/01/09 06:29:06 tedu Exp $ */
+/* $OpenBSD: ip_ether.c,v 1.66 2014/04/14 09:06:42 mpi Exp $ */
/*
* The author of this code is Angelos D. Keromytis (kermit@adk.gr)
*
@@ -276,7 +276,7 @@ etherip_decap(struct mbuf *m, int iphlen)
pf_pkt_addr_changed(m);
#endif
m->m_pkthdr.rcvif = &sc->gif_if;
- m->m_pkthdr.rdomain = sc->gif_if.if_rdomain;
+ m->m_pkthdr.ph_rtableid = sc->gif_if.if_rdomain;
if (m->m_flags & (M_BCAST|M_MCAST))
sc->gif_if.if_imcasts++;
@@ -342,7 +342,7 @@ mplsip_decap(struct mbuf *m, int iphlen)
#endif
m->m_pkthdr.rcvif = &sc->gif_if;
- m->m_pkthdr.rdomain = sc->gif_if.if_rdomain;
+ m->m_pkthdr.ph_rtableid = sc->gif_if.if_rdomain;
#if NPF > 0
pf_pkt_addr_changed(m);
#endif
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);
}
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index 7f55d6e61b2..4fecc8b6ced 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_icmp.c,v 1.118 2014/03/21 10:44:42 mpi Exp $ */
+/* $OpenBSD: ip_icmp.c,v 1.119 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
@@ -218,8 +218,8 @@ icmp_do_error(struct mbuf *n, int type, int code, n_long dest, int destmtu)
}
if (m == NULL)
goto freeit;
- /* keep in same domain and rtable (the latter is a bit unclear) */
- m->m_pkthdr.rdomain = n->m_pkthdr.rdomain;
+ /* keep in same rtable */
+ m->m_pkthdr.ph_rtableid = n->m_pkthdr.ph_rtableid;
m->m_len = icmplen + ICMP_MINLEN;
if ((m->m_flags & M_EXT) == 0)
MH_ALIGN(m, m->m_len);
@@ -491,7 +491,7 @@ icmp_input(struct mbuf *m, ...)
*/
ctlfunc = inetsw[ip_protox[icp->icmp_ip.ip_p]].pr_ctlinput;
if (ctlfunc)
- (*ctlfunc)(code, sintosa(&sin), m->m_pkthdr.rdomain,
+ (*ctlfunc)(code, sintosa(&sin), m->m_pkthdr.ph_rtableid,
&icp->icmp_ip);
break;
@@ -638,10 +638,10 @@ reflect:
#endif
rtredirect(sintosa(&sdst), sintosa(&sgw), NULL,
RTF_GATEWAY | RTF_HOST, sintosa(&ssrc),
- &newrt, m->m_pkthdr.rdomain);
+ &newrt, m->m_pkthdr.ph_rtableid);
if (newrt != NULL && icmp_redirtimeout != 0) {
(void)rt_timer_add(newrt, icmp_redirect_timeout,
- icmp_redirect_timeout_q, m->m_pkthdr.rdomain);
+ icmp_redirect_timeout_q, m->m_pkthdr.ph_rtableid);
}
if (newrt != NULL)
rtfree(newrt);
@@ -709,7 +709,7 @@ icmp_reflect(struct mbuf *m, struct mbuf **op, struct in_ifaddr *ia)
if (ia == NULL) {
TAILQ_FOREACH(ia, &in_ifaddr, ia_list) {
if (ia->ia_ifp->if_rdomain !=
- rtable_l2(m->m_pkthdr.rdomain))
+ rtable_l2(m->m_pkthdr.ph_rtableid))
continue;
if (t.s_addr == ia->ia_addr.sin_addr.s_addr)
break;
@@ -729,7 +729,7 @@ icmp_reflect(struct mbuf *m, struct mbuf **op, struct in_ifaddr *ia)
struct route ro;
memset(&ro, 0, sizeof(ro));
- ro.ro_tableid = m->m_pkthdr.rdomain;
+ ro.ro_tableid = m->m_pkthdr.ph_rtableid;
dst = satosin(&ro.ro_dst);
dst->sin_family = AF_INET;
dst->sin_len = sizeof(*dst);
@@ -737,7 +737,7 @@ icmp_reflect(struct mbuf *m, struct mbuf **op, struct in_ifaddr *ia)
/* keep packet in the original virtual instance */
ro.ro_rt = rtalloc1(&ro.ro_dst, RT_REPORT,
- m->m_pkthdr.rdomain);
+ m->m_pkthdr.ph_rtableid);
if (ro.ro_rt == 0) {
ipstat.ips_noroute++;
m_freem(m);
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 0022d57696e..cdff2df43a0 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.228 2014/03/27 10:44:23 mpi Exp $ */
+/* $OpenBSD: ip_input.c,v 1.229 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -673,7 +673,7 @@ in_ouraddr(struct mbuf *m, struct ifnet *ifp, struct in_addr ina)
sin.sin_len = sizeof(sin);
sin.sin_family = AF_INET;
sin.sin_addr = ina;
- ia = ifatoia(ifa_ifwithaddr(sintosa(&sin), m->m_pkthdr.rdomain));
+ ia = ifatoia(ifa_ifwithaddr(sintosa(&sin), m->m_pkthdr.ph_rtableid));
if (ia == NULL) {
struct ifaddr *ifa;
@@ -688,7 +688,7 @@ in_ouraddr(struct mbuf *m, struct ifnet *ifp, struct in_addr ina)
!IN_CLASSFULBROADCAST(ina.s_addr, ina.s_addr))
return (0);
- if (ifp->if_rdomain != m->m_pkthdr.rdomain)
+ if (ifp->if_rdomain != rtable_l2(m->m_pkthdr.ph_rtableid))
return (0);
/*
* The check in the loop assumes you only rx a packet on an UP
@@ -1065,7 +1065,7 @@ ip_dooptions(struct mbuf *m, struct ifnet *ifp)
}
ipaddr.sin_addr = ip->ip_dst;
ia = ifatoia(ifa_ifwithaddr(sintosa(&ipaddr),
- m->m_pkthdr.rdomain));
+ m->m_pkthdr.ph_rtableid));
if (ia == 0) {
if (opt == IPOPT_SSRR) {
type = ICMP_UNREACH;
@@ -1094,13 +1094,13 @@ ip_dooptions(struct mbuf *m, struct ifnet *ifp)
sizeof(ipaddr.sin_addr));
if (opt == IPOPT_SSRR) {
if ((ia = ifatoia(ifa_ifwithdstaddr(sintosa(&ipaddr),
- m->m_pkthdr.rdomain))) == NULL)
+ m->m_pkthdr.ph_rtableid))) == NULL)
ia = ifatoia(ifa_ifwithnet(sintosa(&ipaddr),
- m->m_pkthdr.rdomain));
+ m->m_pkthdr.ph_rtableid));
} else
/* keep packet in the virtual instance */
ia = ip_rtaddr(ipaddr.sin_addr,
- m->m_pkthdr.rdomain);
+ m->m_pkthdr.ph_rtableid);
if (ia == 0) {
type = ICMP_UNREACH;
code = ICMP_UNREACH_SRCFAIL;
@@ -1140,9 +1140,9 @@ ip_dooptions(struct mbuf *m, struct ifnet *ifp)
* Again keep the packet inside the virtual instance.
*/
if ((ia = ifatoia(ifa_ifwithaddr(sintosa(&ipaddr),
- m->m_pkthdr.rdomain))) == 0 &&
+ m->m_pkthdr.ph_rtableid))) == 0 &&
(ia = ip_rtaddr(ipaddr.sin_addr,
- m->m_pkthdr.rdomain)) == 0) {
+ m->m_pkthdr.ph_rtableid)) == 0) {
type = ICMP_UNREACH;
code = ICMP_UNREACH_HOST;
goto bad;
@@ -1191,7 +1191,7 @@ ip_dooptions(struct mbuf *m, struct ifnet *ifp)
memcpy(&ipaddr.sin_addr, &sin,
sizeof(struct in_addr));
if (ifa_ifwithaddr(sintosa(&ipaddr),
- m->m_pkthdr.rdomain) == 0)
+ m->m_pkthdr.ph_rtableid) == 0)
continue;
ipt.ipt_ptr += sizeof(struct in_addr);
break;
@@ -1402,7 +1402,7 @@ ip_forward(struct mbuf *m, struct ifnet *ifp, int srcrt)
return;
}
- rtableid = m->m_pkthdr.rdomain;
+ rtableid = m->m_pkthdr.ph_rtableid;
sin = satosin(&ipforward_rt.ro_dst);
if ((rt = ipforward_rt.ro_rt) == 0 ||
@@ -1458,7 +1458,7 @@ ip_forward(struct mbuf *m, struct ifnet *ifp, int srcrt)
(rt->rt_flags & (RTF_DYNAMIC|RTF_MODIFIED)) == 0 &&
satosin(rt_key(rt))->sin_addr.s_addr != 0 &&
ipsendredirects && !srcrt &&
- !arpproxy(satosin(rt_key(rt))->sin_addr, m->m_pkthdr.rdomain)) {
+ !arpproxy(satosin(rt_key(rt))->sin_addr, m->m_pkthdr.ph_rtableid)) {
if (rt->rt_ifa &&
(ip->ip_src.s_addr & ifatoia(rt->rt_ifa)->ia_netmask) ==
ifatoia(rt->rt_ifa)->ia_net) {
diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c
index fd67c21695c..9f67b266d5a 100644
--- a/sys/netinet/ip_ipip.c
+++ b/sys/netinet/ip_ipip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipip.c,v 1.51 2013/10/24 11:31:43 mpi Exp $ */
+/* $OpenBSD: ip_ipip.c,v 1.52 2014/04/14 09:06:42 mpi Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -313,7 +313,7 @@ ipip_input(struct mbuf *m, int iphlen, struct ifnet *gifp, int proto)
if ((m->m_pkthdr.rcvif == NULL ||
!(m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK)) &&
ipip_allow != 2) {
- rdomain = rtable_l2(m->m_pkthdr.rdomain);
+ rdomain = rtable_l2(m->m_pkthdr.ph_rtableid);
TAILQ_FOREACH(ifp, &ifnet, if_list) {
if (ifp->if_rdomain != rdomain)
continue;
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c
index 4bf78b72421..ed39eb78e25 100644
--- a/sys/netinet/ip_ipsp.c
+++ b/sys/netinet/ip_ipsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.c,v 1.193 2014/01/09 06:29:06 tedu Exp $ */
+/* $OpenBSD: ip_ipsp.c,v 1.194 2014/04/14 09:06:42 mpi Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
@@ -1182,7 +1182,7 @@ ipsp_parse_headers(struct mbuf *m, int off, u_int8_t proto)
sizeof(struct sockaddr_in6);
tdbi->dst.sin6.sin6_addr = ip6_dst;
tdbi->rdomain =
- rtable_l2(m->m_pkthdr.rdomain);
+ rtable_l2(m->m_pkthdr.ph_rtableid);
SLIST_INSERT_HEAD(&tags,
mtag, m_tag_link);
}
@@ -1275,7 +1275,7 @@ ipsp_parse_headers(struct mbuf *m, int off, u_int8_t proto)
(caddr_t) &tdbi->spi);
tdbi->proto = proto; /* AH or ESP */
- tdbi->rdomain = rtable_l2(m->m_pkthdr.rdomain);
+ tdbi->rdomain = rtable_l2(m->m_pkthdr.ph_rtableid);
#ifdef INET
/* Last network header was IPv4. */
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 3c5cb18912b..3fd187b9d23 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_output.c,v 1.260 2014/04/07 10:04:17 mpi Exp $ */
+/* $OpenBSD: ip_output.c,v 1.261 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@@ -182,7 +182,7 @@ ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro, int flags,
*/
if (ro->ro_rt && ((ro->ro_rt->rt_flags & RTF_UP) == 0 ||
dst->sin_addr.s_addr != ip->ip_dst.s_addr ||
- ro->ro_tableid != m->m_pkthdr.rdomain)) {
+ ro->ro_tableid != m->m_pkthdr.ph_rtableid)) {
RTFREE(ro->ro_rt);
ro->ro_rt = (struct rtentry *)0;
}
@@ -191,7 +191,7 @@ ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro, int flags,
dst->sin_family = AF_INET;
dst->sin_len = sizeof(*dst);
dst->sin_addr = ip->ip_dst;
- ro->ro_tableid = m->m_pkthdr.rdomain;
+ ro->ro_tableid = m->m_pkthdr.ph_rtableid;
}
if ((IN_MULTICAST(ip->ip_dst.s_addr) ||
@@ -332,7 +332,7 @@ reroute:
*/
if (ro->ro_rt && ((ro->ro_rt->rt_flags & RTF_UP) == 0 ||
dst->sin_addr.s_addr != ip->ip_dst.s_addr ||
- ro->ro_tableid != m->m_pkthdr.rdomain)) {
+ ro->ro_tableid != m->m_pkthdr.ph_rtableid)) {
RTFREE(ro->ro_rt);
ro->ro_rt = (struct rtentry *)0;
}
@@ -341,7 +341,7 @@ reroute:
dst->sin_family = AF_INET;
dst->sin_len = sizeof(*dst);
dst->sin_addr = ip->ip_dst;
- ro->ro_tableid = m->m_pkthdr.rdomain;
+ ro->ro_tableid = m->m_pkthdr.ph_rtableid;
}
if ((IN_MULTICAST(ip->ip_dst.s_addr) ||
@@ -489,7 +489,7 @@ reroute:
* this check.
*/
if ((sproto == 0) && (in_broadcast(dst->sin_addr, ifp,
- m->m_pkthdr.rdomain))) {
+ m->m_pkthdr.ph_rtableid))) {
if ((ifp->if_flags & IFF_BROADCAST) == 0) {
error = EADDRNOTAVAIL;
goto bad;
@@ -522,7 +522,7 @@ sendit:
* Check if the packet needs encapsulation.
*/
if (sproto != 0) {
- tdb = gettdb(rtable_l2(m->m_pkthdr.rdomain),
+ tdb = gettdb(rtable_l2(m->m_pkthdr.ph_rtableid),
sspi, &sdst, sproto);
if (tdb == NULL) {
DPRINTF(("ip_output: unknown TDB"));
@@ -578,7 +578,7 @@ sendit:
rt = NULL;
else if (rt == NULL || (rt->rt_flags & RTF_HOST) == 0) {
rt = icmp_mtudisc_clone(ip->ip_dst,
- m->m_pkthdr.rdomain);
+ m->m_pkthdr.ph_rtableid);
rt_mtucloned = 1;
}
DPRINTF(("ip_output: spi %08x mtu %d rt %p cloned %d\n",
@@ -588,7 +588,7 @@ sendit:
if (ro && ro->ro_rt != NULL) {
RTFREE(ro->ro_rt);
ro->ro_rt = rtalloc1(&ro->ro_dst, RT_REPORT,
- m->m_pkthdr.rdomain);
+ m->m_pkthdr.ph_rtableid);
}
if (rt_mtucloned)
rtfree(rt);
@@ -778,9 +778,9 @@ ip_fragment(struct mbuf *m, struct ifnet *ifp, u_long mtu)
m->m_data += max_linkhdr;
mhip = mtod(m, struct ip *);
*mhip = *ip;
- /* we must inherit MCAST and BCAST flags and rdomain */
+ /* we must inherit MCAST and BCAST flags and routing table */
m->m_flags |= m0->m_flags & (M_MCAST|M_BCAST);
- m->m_pkthdr.rdomain = m0->m_pkthdr.rdomain;
+ m->m_pkthdr.ph_rtableid = m0->m_pkthdr.ph_rtableid;
if (hlen > sizeof (struct ip)) {
mhlen = ip_optcopy(ip, mhip) + sizeof (struct ip);
mhip->ip_hl = mhlen >> 2;
diff --git a/sys/netinet/ip_spd.c b/sys/netinet/ip_spd.c
index 795bc0381d0..49621775410 100644
--- a/sys/netinet/ip_spd.c
+++ b/sys/netinet/ip_spd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_spd.c,v 1.70 2014/01/09 06:29:06 tedu Exp $ */
+/* $OpenBSD: ip_spd.c,v 1.71 2014/04/14 09:06:42 mpi Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -95,7 +95,7 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int *error, int direction,
struct ipsec_ref *dstid = NULL, *srcid = NULL;
struct tdb *tdbin = NULL;
int signore = 0, dignore = 0;
- u_int rdomain = rtable_l2(m->m_pkthdr.rdomain);
+ u_int rdomain = rtable_l2(m->m_pkthdr.ph_rtableid);
/*
* If there are no flows in place, there's no point
diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c
index 5b9a36fb437..40f7afbae36 100644
--- a/sys/netinet/ipsec_input.c
+++ b/sys/netinet/ipsec_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec_input.c,v 1.119 2014/01/09 06:29:06 tedu Exp $ */
+/* $OpenBSD: ipsec_input.c,v 1.120 2014/04/14 09:06:42 mpi Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -235,7 +235,7 @@ ipsec_common_input(struct mbuf *m, int skip, int protoff, int af, int sproto,
}
s = splsoftnet();
- tdbp = gettdb(rtable_l2(m->m_pkthdr.rdomain),
+ tdbp = gettdb(rtable_l2(m->m_pkthdr.ph_rtableid),
spi, &dst_address, sproto);
if (tdbp == NULL) {
splx(s);
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);
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index ced6114875e..0572c82aeca 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.272 2014/01/24 18:54:58 henning Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.273 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -464,7 +464,7 @@ tcp_input(struct mbuf *m, ...)
ip = mtod(m, struct ip *);
if (IN_MULTICAST(ip->ip_dst.s_addr) ||
in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif,
- m->m_pkthdr.rdomain))
+ m->m_pkthdr.ph_rtableid))
goto drop;
#ifdef TCP_ECN
/* save ip_tos before clearing it for checksum */
@@ -595,13 +595,13 @@ findpcb:
case AF_INET6:
inp = in6_pcbhashlookup(&tcbtable, &ip6->ip6_src,
th->th_sport, &ip6->ip6_dst, th->th_dport,
- m->m_pkthdr.rdomain);
+ m->m_pkthdr.ph_rtableid);
break;
#endif
case AF_INET:
inp = in_pcbhashlookup(&tcbtable, ip->ip_src,
th->th_sport, ip->ip_dst, th->th_dport,
- m->m_pkthdr.rdomain);
+ m->m_pkthdr.ph_rtableid);
break;
}
#if NPF > 0
@@ -621,13 +621,13 @@ findpcb:
case AF_INET6:
inp = in6_pcblookup_listen(&tcbtable,
&ip6->ip6_dst, th->th_dport, inpl_reverse, m,
- m->m_pkthdr.rdomain);
+ m->m_pkthdr.ph_rtableid);
break;
#endif /* INET6 */
case AF_INET:
inp = in_pcblookup_listen(&tcbtable,
ip->ip_dst, th->th_dport, inpl_reverse, m,
- m->m_pkthdr.rdomain);
+ m->m_pkthdr.ph_rtableid);
break;
}
/*
@@ -959,7 +959,7 @@ findpcb:
if (optp)
#endif
if (tcp_dooptions(tp, optp, optlen, th, m, iphlen, &opti,
- m->m_pkthdr.rdomain))
+ m->m_pkthdr.ph_rtableid))
goto drop;
if (opti.ts_present && opti.ts_ecr) {
@@ -2255,12 +2255,12 @@ dropwithreset:
goto drop;
if (tiflags & TH_ACK) {
tcp_respond(tp, mtod(m, caddr_t), th, (tcp_seq)0, th->th_ack,
- TH_RST, m->m_pkthdr.rdomain);
+ TH_RST, m->m_pkthdr.ph_rtableid);
} else {
if (tiflags & TH_SYN)
tlen++;
tcp_respond(tp, mtod(m, caddr_t), th, th->th_seq + tlen,
- (tcp_seq)0, TH_RST|TH_ACK, m->m_pkthdr.rdomain);
+ (tcp_seq)0, TH_RST|TH_ACK, m->m_pkthdr.ph_rtableid);
}
m_freem(m);
return;
@@ -3900,7 +3900,7 @@ syn_cache_get(struct sockaddr *src, struct sockaddr *dst, struct tcphdr *th,
resetandabort:
tcp_respond(NULL, mtod(m, caddr_t), th, (tcp_seq)0, th->th_ack, TH_RST,
- m->m_pkthdr.rdomain);
+ m->m_pkthdr.ph_rtableid);
m_freem(m);
abort:
if (so != NULL)
@@ -4238,7 +4238,7 @@ syn_cache_respond(struct syn_cache *sc, struct mbuf *m)
m->m_data += max_linkhdr;
m->m_len = m->m_pkthdr.len = tlen;
m->m_pkthdr.rcvif = NULL;
- m->m_pkthdr.rdomain = sc->sc_rtableid;
+ m->m_pkthdr.ph_rtableid = sc->sc_rtableid;
memset(mtod(m, u_char *), 0, tlen);
switch (sc->sc_src.sa.sa_family) {
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index caacc1d8233..d18c22776cb 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_output.c,v 1.104 2014/04/07 10:04:17 mpi Exp $ */
+/* $OpenBSD: tcp_output.c,v 1.105 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */
/*
@@ -1050,8 +1050,8 @@ send:
}
#endif
- /* force routing domain */
- m->m_pkthdr.rdomain = tp->t_inpcb->inp_rtableid;
+ /* force routing table */
+ m->m_pkthdr.ph_rtableid = tp->t_inpcb->inp_rtableid;
#if NPF > 0
m->m_pkthdr.pf.inp = tp->t_inpcb;
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 5cbe000edd6..4ab283ccab8 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_subr.c,v 1.125 2013/10/24 11:31:43 mpi Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.126 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
@@ -397,11 +397,11 @@ tcp_respond(struct tcpcb *tp, caddr_t template, struct tcphdr *th0,
th->th_win = htons((u_int16_t)win);
th->th_urp = 0;
- /* force routing domain */
+ /* force routing table */
if (tp)
- m->m_pkthdr.rdomain = tp->t_inpcb->inp_rtableid;
+ m->m_pkthdr.ph_rtableid = tp->t_inpcb->inp_rtableid;
else
- m->m_pkthdr.rdomain = rtableid;
+ m->m_pkthdr.ph_rtableid = rtableid;
switch (af) {
#ifdef INET6
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 09f1b3689f0..6bfe5238e4b 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_usrreq.c,v 1.179 2014/04/07 19:51:15 chrisz Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.180 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
@@ -406,10 +406,11 @@ udp_input(struct mbuf *m, ...)
if ((ip6 && IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) ||
(ip && IN_MULTICAST(ip->ip_dst.s_addr)) ||
(ip && in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif,
- m->m_pkthdr.rdomain))) {
+ m->m_pkthdr.ph_rtableid))) {
#else /* INET6 */
if (IN_MULTICAST(ip->ip_dst.s_addr) ||
- in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif, m->m_pkthdr.rdomain)) {
+ in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif,
+ m->m_pkthdr.ph_rtableid)) {
#endif /* INET6 */
struct inpcb *last;
/*
@@ -446,7 +447,7 @@ udp_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_lport != uh->uh_dport)
continue;
@@ -563,11 +564,11 @@ udp_input(struct mbuf *m, ...)
if (ip6)
inp = in6_pcbhashlookup(&udbtable, &ip6->ip6_src,
uh->uh_sport, &ip6->ip6_dst, uh->uh_dport,
- m->m_pkthdr.rdomain);
+ m->m_pkthdr.ph_rtableid);
else
#endif /* INET6 */
inp = in_pcbhashlookup(&udbtable, ip->ip_src, uh->uh_sport,
- ip->ip_dst, uh->uh_dport, m->m_pkthdr.rdomain);
+ ip->ip_dst, uh->uh_dport, m->m_pkthdr.ph_rtableid);
#if NPF > 0
if (m->m_pkthdr.pf.statekey && inp) {
m->m_pkthdr.pf.statekey->inp = inp;
@@ -584,12 +585,12 @@ udp_input(struct mbuf *m, ...)
if (ip6) {
inp = in6_pcblookup_listen(&udbtable,
&ip6->ip6_dst, uh->uh_dport, inpl_reverse, m,
- m->m_pkthdr.rdomain);
+ m->m_pkthdr.ph_rtableid);
} else
#endif /* INET6 */
inp = in_pcblookup_listen(&udbtable,
ip->ip_dst, uh->uh_dport, inpl_reverse, m,
- m->m_pkthdr.rdomain);
+ m->m_pkthdr.ph_rtableid);
if (inp == 0) {
udpstat.udps_noport++;
if (m->m_flags & (M_BCAST | M_MCAST)) {
@@ -1093,8 +1094,8 @@ udp_output(struct mbuf *m, ...)
udpstat.udps_opackets++;
- /* 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,
(inp->inp_socket->so_options & SO_BROADCAST) | IP_IPSECFLOW,
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index 18683a2e9f5..f27ce57ffbb 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frag6.c,v 1.51 2013/11/11 09:15:35 mpi Exp $ */
+/* $OpenBSD: frag6.c,v 1.52 2014/04/14 09:06:42 mpi Exp $ */
/* $KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $ */
/*
@@ -189,7 +189,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
#ifdef IN6_IFSTAT_STRICT
/* find the destination interface of the packet. */
bzero(&ro, sizeof(ro));
- ro.ro_tableid = m->m_pkthdr.rdomain;
+ ro.ro_tableid = m->m_pkthdr.ph_rtableid;
dst = &ro.ro_dst;
dst->sin6_family = AF_INET6;
dst->sin6_len = sizeof(struct sockaddr_in6);
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 4fa3cbec1f7..3d8a0f6ba78 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp6.c,v 1.141 2014/03/21 10:44:42 mpi Exp $ */
+/* $OpenBSD: icmp6.c,v 1.142 2014/04/14 09:06:42 mpi Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@@ -1061,7 +1061,7 @@ icmp6_notify_error(struct mbuf *m, int off, int icmp6len, int code)
ctlfunc = inet6sw[ip6_protox[nxt]].pr_ctlinput;
if (ctlfunc)
(*ctlfunc)(code, sin6tosa(&icmp6dst),
- m->m_pkthdr.rdomain, &ip6cp);
+ m->m_pkthdr.ph_rtableid, &ip6cp);
}
return (0);
@@ -1120,7 +1120,7 @@ icmp6_mtudisc_update(struct ip6ctlparam *ip6cp, int validated)
sin6.sin6_scope_id = in6_addr2scopeid(m->m_pkthdr.rcvif,
&sin6.sin6_addr);
- rt = icmp6_mtudisc_clone(sin6tosa(&sin6), m->m_pkthdr.rdomain);
+ rt = icmp6_mtudisc_clone(sin6tosa(&sin6), m->m_pkthdr.ph_rtableid);
if (rt && (rt->rt_flags & RTF_HOST) &&
!(rt->rt_rmx.rmx_locks & RTV_MTU) &&
@@ -1140,7 +1140,7 @@ icmp6_mtudisc_update(struct ip6ctlparam *ip6cp, int validated)
*/
for (mc = LIST_FIRST(&icmp6_mtudisc_callbacks); mc != NULL;
mc = LIST_NEXT(mc, mc_list))
- (*mc->mc_func)(&sin6, m->m_pkthdr.rdomain);
+ (*mc->mc_func)(&sin6, m->m_pkthdr.ph_rtableid);
}
/*
@@ -1190,7 +1190,7 @@ ni6_input(struct mbuf *m, int off)
sin6.sin6_len = sizeof(struct sockaddr_in6);
bcopy(&ip6->ip6_dst, &sin6.sin6_addr, sizeof(sin6.sin6_addr));
/* XXX scopeid */
- if (ifa_ifwithaddr(sin6tosa(&sin6), m->m_pkthdr.rdomain))
+ if (ifa_ifwithaddr(sin6tosa(&sin6), m->m_pkthdr.ph_rtableid))
; /* unicast/anycast, fine */
else if (IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr))
; /* link-local multicast, fine */
@@ -2072,7 +2072,7 @@ icmp6_reflect(struct mbuf *m, size_t off)
*/
bzero(&ro, sizeof(ro));
src = in6_selectsrc(&sa6_src, NULL, NULL, &ro, NULL, &e,
- m->m_pkthdr.rdomain);
+ m->m_pkthdr.ph_rtableid);
if (ro.ro_rt) { /* XXX: see comments in icmp6_mtudisc_update */
RTFREE(ro.ro_rt); /* XXX: we could use this */
}
@@ -2226,7 +2226,7 @@ icmp6_redirect_input(struct mbuf *m, int off)
sin6.sin6_family = AF_INET6;
sin6.sin6_len = sizeof(struct sockaddr_in6);
bcopy(&reddst6, &sin6.sin6_addr, sizeof(reddst6));
- rt = rtalloc1(sin6tosa(&sin6), 0, m->m_pkthdr.rdomain);
+ rt = rtalloc1(sin6tosa(&sin6), 0, m->m_pkthdr.ph_rtableid);
if (rt) {
if (rt->rt_gateway == NULL ||
rt->rt_gateway->sa_family != AF_INET6) {
@@ -2338,11 +2338,11 @@ icmp6_redirect_input(struct mbuf *m, int off)
bcopy(&src6, &ssrc.sin6_addr, sizeof(struct in6_addr));
rtredirect(sin6tosa(&sdst), sin6tosa(&sgw), NULL,
RTF_GATEWAY | RTF_HOST, sin6tosa(&ssrc),
- &newrt, m->m_pkthdr.rdomain);
+ &newrt, m->m_pkthdr.ph_rtableid);
if (newrt) {
(void)rt_timer_add(newrt, icmp6_redirect_timeout,
- icmp6_redirect_timeout_q, m->m_pkthdr.rdomain);
+ icmp6_redirect_timeout_q, m->m_pkthdr.ph_rtableid);
rtfree(newrt);
}
}
diff --git a/sys/netinet6/ip6_divert.c b/sys/netinet6/ip6_divert.c
index 8d41b8485e4..f66f64acf7a 100644
--- a/sys/netinet6/ip6_divert.c
+++ b/sys/netinet6/ip6_divert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_divert.c,v 1.20 2014/04/07 10:04:17 mpi Exp $ */
+/* $OpenBSD: ip6_divert.c,v 1.21 2014/04/14 09:06:42 mpi Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -102,7 +102,7 @@ divert6_output(struct mbuf *m, ...)
m->m_pkthdr.rcvif = NULL;
m->m_nextpkt = NULL;
- m->m_pkthdr.rdomain = inp->inp_rtableid;
+ m->m_pkthdr.ph_rtableid = inp->inp_rtableid;
if (control)
m_freem(control);
@@ -165,7 +165,8 @@ divert6_output(struct mbuf *m, ...)
if (!IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
ip6addr.sin6_addr = sin6->sin6_addr;
- ifa = ifa_ifwithaddr(sin6tosa(&ip6addr), m->m_pkthdr.rdomain);
+ ifa = ifa_ifwithaddr(sin6tosa(&ip6addr),
+ m->m_pkthdr.ph_rtableid);
if (ifa == NULL) {
error = EADDRNOTAVAIL;
goto fail;
diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c
index bc3e0cf48c1..ceccbe7d72a 100644
--- a/sys/netinet6/ip6_forward.c
+++ b/sys/netinet6/ip6_forward.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_forward.c,v 1.64 2014/01/29 00:50:56 dlg Exp $ */
+/* $OpenBSD: ip6_forward.c,v 1.65 2014/04/14 09:06:42 mpi Exp $ */
/* $KAME: ip6_forward.c,v 1.75 2001/06/29 12:42:13 jinmei Exp $ */
/*
@@ -233,7 +233,7 @@ reroute:
#endif /* IPSEC */
#if NPF > 0
- rtableid = m->m_pkthdr.rdomain;
+ rtableid = m->m_pkthdr.ph_rtableid;
#endif
dst = &ip6_forward_rt.ro_dst;
@@ -333,7 +333,7 @@ reroute:
* PMTU notification. is it okay?
*/
if (sproto != 0) {
- tdb = gettdb(rtable_l2(m->m_pkthdr.rdomain),
+ tdb = gettdb(rtable_l2(m->m_pkthdr.ph_rtableid),
sspi, &sdst, sproto);
if (tdb == NULL) {
error = EHOSTUNREACH;
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index aa331b3e82d..3e7e1ae4ce7 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_input.c,v 1.123 2014/02/13 11:20:54 mpi Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.124 2014/04/14 09:06:42 mpi Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -427,7 +427,7 @@ ip6_input(struct mbuf *m)
}
#if NPF > 0
- rtableid = m->m_pkthdr.rdomain;
+ rtableid = m->m_pkthdr.ph_rtableid;
#endif
/*
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index dbad789dc5c..edf128a252b 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.153 2014/01/23 23:51:29 henning Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.154 2014/04/14 09:06:42 mpi Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -496,7 +496,7 @@ reroute:
* packet gets tunneled?
*/
- tdb = gettdb(rtable_l2(m->m_pkthdr.rdomain),
+ tdb = gettdb(rtable_l2(m->m_pkthdr.ph_rtableid),
sspi, &sdst, sproto);
if (tdb == NULL) {
error = EHOSTUNREACH;
@@ -544,9 +544,9 @@ reroute:
dstsock.sin6_family = AF_INET6;
dstsock.sin6_addr = ip6->ip6_dst;
dstsock.sin6_len = sizeof(dstsock);
- ro->ro_tableid = m->m_pkthdr.rdomain;
+ ro->ro_tableid = m->m_pkthdr.ph_rtableid;
if ((error = in6_selectroute(&dstsock, opt, im6o, ro, &ifp,
- &rt, m->m_pkthdr.rdomain)) != 0) {
+ &rt, m->m_pkthdr.ph_rtableid)) != 0) {
switch (error) {
case EHOSTUNREACH:
ip6stat.ip6s_noroute++;
@@ -2475,7 +2475,7 @@ ip6_setmoptions(int optname, struct ip6_moptions **im6op, struct mbuf *m)
* XXX: is it a good approach?
*/
bzero(&ro, sizeof(ro));
- ro.ro_tableid = m->m_pkthdr.rdomain;
+ ro.ro_tableid = m->m_pkthdr.ph_rtableid;
dst = &ro.ro_dst;
dst->sin6_len = sizeof(struct sockaddr_in6);
dst->sin6_family = AF_INET6;
diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c
index 09c42e89027..5b93ef99c93 100644
--- a/sys/netinet6/mld6.c
+++ b/sys/netinet6/mld6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mld6.c,v 1.37 2014/01/24 12:20:22 naddy Exp $ */
+/* $OpenBSD: mld6.c,v 1.38 2014/04/14 09:06:42 mpi Exp $ */
/* $KAME: mld6.c,v 1.26 2001/02/16 14:50:35 itojun Exp $ */
/*
@@ -407,7 +407,7 @@ mld6_sendpkt(struct in6_multi *in6m, int type, const struct in6_addr *dst)
mh->m_next = md;
mh->m_pkthdr.rcvif = NULL;
- mh->m_pkthdr.rdomain = ifp->if_rdomain;
+ mh->m_pkthdr.ph_rtableid = ifp->if_rdomain;
mh->m_pkthdr.len = sizeof(struct ip6_hdr) + sizeof(struct mld_hdr);
mh->m_len = sizeof(struct ip6_hdr);
MH_ALIGN(mh, sizeof(struct ip6_hdr));
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 293a886f9d3..70faed0b066 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.c,v 1.113 2014/03/27 10:39:23 mpi Exp $ */
+/* $OpenBSD: nd6.c,v 1.114 2014/04/14 09:06:42 mpi Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
@@ -1637,7 +1637,7 @@ nd6_output(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0,
if (rt) {
if ((rt->rt_flags & RTF_UP) == 0) {
if ((rt0 = rt = rtalloc1(sin6tosa(dst),
- RT_REPORT, m->m_pkthdr.rdomain)) != NULL)
+ RT_REPORT, m->m_pkthdr.ph_rtableid)) != NULL)
{
rt->rt_refcnt--;
if (rt->rt_ifp != ifp)
@@ -1676,7 +1676,7 @@ nd6_output(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0,
rtfree(rt); rt = rt0;
lookup:
rt->rt_gwroute = rtalloc1(rt->rt_gateway,
- RT_REPORT, m->m_pkthdr.rdomain);
+ RT_REPORT, m->m_pkthdr.ph_rtableid);
if ((rt = rt->rt_gwroute) == 0)
senderr(EHOSTUNREACH);
}
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index 15a0eea2a22..52da768dcf2 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_nbr.c,v 1.76 2014/03/21 09:45:09 mpi Exp $ */
+/* $OpenBSD: nd6_nbr.c,v 1.77 2014/04/14 09:06:42 mpi Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
@@ -219,7 +219,7 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len)
tsin6.sin6_family = AF_INET6;
tsin6.sin6_addr = taddr6;
- rt = rtalloc1(sin6tosa(&tsin6), 0, m->m_pkthdr.rdomain);
+ rt = rtalloc1(sin6tosa(&tsin6), 0, m->m_pkthdr.ph_rtableid);
if (rt && (rt->rt_flags & RTF_ANNOUNCE) != 0 &&
rt->rt_gateway->sa_family == AF_LINK) {
/*
@@ -384,7 +384,7 @@ nd6_ns_output(struct ifnet *ifp, struct in6_addr *daddr6,
if (m == NULL)
return;
m->m_pkthdr.rcvif = NULL;
- m->m_pkthdr.rdomain = ifp->if_rdomain;
+ m->m_pkthdr.ph_rtableid = ifp->if_rdomain;
if (daddr6 == NULL || IN6_IS_ADDR_MULTICAST(daddr6)) {
m->m_flags |= M_MCAST;
@@ -457,7 +457,7 @@ nd6_ns_output(struct ifnet *ifp, struct in6_addr *daddr6,
bcopy(&dst_sa, &ro.ro_dst, sizeof(dst_sa));
src0 = in6_selectsrc(&dst_sa, NULL, NULL, &ro, NULL,
- &error, m->m_pkthdr.rdomain);
+ &error, m->m_pkthdr.ph_rtableid);
if (src0 == NULL) {
char addr[INET6_ADDRSTRLEN];
@@ -927,7 +927,7 @@ nd6_na_output(struct ifnet *ifp, struct in6_addr *daddr6,
if (m == NULL)
return;
m->m_pkthdr.rcvif = NULL;
- m->m_pkthdr.rdomain = ifp->if_rdomain;
+ m->m_pkthdr.ph_rtableid = ifp->if_rdomain;
if (IN6_IS_ADDR_MULTICAST(daddr6)) {
m->m_flags |= M_MCAST;
@@ -969,7 +969,7 @@ nd6_na_output(struct ifnet *ifp, struct in6_addr *daddr6,
*/
bcopy(&dst_sa, &ro.ro_dst, sizeof(dst_sa));
src0 = in6_selectsrc(&dst_sa, NULL, NULL, &ro, NULL, &error,
- m->m_pkthdr.rdomain);
+ m->m_pkthdr.ph_rtableid);
if (src0 == NULL) {
char addr[INET6_ADDRSTRLEN];
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index 93fe8a8b342..36ccd5afa5b 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip6.c,v 1.64 2014/01/08 22:38:29 bluhm Exp $ */
+/* $OpenBSD: raw_ip6.c,v 1.65 2014/04/14 09:06:42 mpi Exp $ */
/* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */
/*
@@ -468,8 +468,8 @@ rip6_output(struct mbuf *m, ...)
if (in6p->inp_flags & IN6P_MINMTU)
flags |= IPV6_MINMTU;
- /* force routing domain */
- m->m_pkthdr.rdomain = in6p->inp_rtableid;
+ /* force routing table */
+ m->m_pkthdr.ph_rtableid = in6p->inp_rtableid;
error = ip6_output(m, optp, &in6p->inp_route6, flags,
in6p->inp_moptions6, &oifp, in6p);
diff --git a/sys/netinet6/udp6_output.c b/sys/netinet6/udp6_output.c
index 2ae95cafa68..543f276f2f1 100644
--- a/sys/netinet6/udp6_output.c
+++ b/sys/netinet6/udp6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp6_output.c,v 1.24 2014/04/09 08:44:08 chrisz Exp $ */
+/* $OpenBSD: udp6_output.c,v 1.25 2014/04/14 09:06:42 mpi Exp $ */
/* $KAME: udp6_output.c,v 1.21 2001/02/07 11:51:54 itojun Exp $ */
/*
@@ -239,8 +239,8 @@ udp6_output(struct inpcb *in6p, struct mbuf *m, struct mbuf *addr6,
udpstat.udps_opackets++;
- /* force routing domain */
- m->m_pkthdr.rdomain = in6p->inp_rtableid;
+ /* force routing table */
+ m->m_pkthdr.ph_rtableid = in6p->inp_rtableid;
error = ip6_output(m, optp, &in6p->inp_route6,
flags, in6p->inp_moptions6, NULL, in6p);
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index dfcd4ecfd65..76c88a3f7b9 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbuf.h,v 1.174 2014/03/27 10:30:58 mpi Exp $ */
+/* $OpenBSD: mbuf.h,v 1.175 2014/04/14 09:06:42 mpi Exp $ */
/* $NetBSD: mbuf.h,v 1.19 1996/02/09 18:25:14 christos Exp $ */
/*
@@ -117,7 +117,7 @@ struct pkthdr {
u_int16_t pad;
u_int16_t csum_flags; /* checksum flags */
u_int16_t ether_vtag; /* Ethernet 802.1p+Q vlan tag */
- u_int rdomain; /* routing domain id */
+ u_int ph_rtableid; /* routing table id */
void *ph_cookie; /* additional data */
struct pkthdr_pf pf;
};