diff options
author | 2014-04-14 09:06:41 +0000 | |
---|---|---|
committer | 2014-04-14 09:06:41 +0000 | |
commit | 5ee8afe39a770ad61ead39a141e8c19b968b0fdd (patch) | |
tree | b87e5dc2add33e729fcb6ee0ec810283a367bb96 /sys/netinet/tcp_input.c | |
parent | Sync the list of man pages with doc/crypto and doc/ssl. MLINKS will (diff) | |
download | wireguard-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/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 22 |
1 files changed, 11 insertions, 11 deletions
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) { |