diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-10-24 16:08:49 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-10-24 16:08:49 +0000 |
commit | e0c077b4ae2af1033ae68483240bcafd270f6d43 (patch) | |
tree | c5e206311f93d050ccc52d43dd956c670f2c0f01 /sys/netinet | |
parent | ba6eab9902faa98bef56bd0329c5174b2be42a06 (diff) |
Ignore Router Advertisment's current hop limit.
Appart from the usual inet6 axe murdering exercise to keep you fit, this
allows us to get rid of a lot of layer violation due to the use of per-
ifp variables to store the current hop limit.
Imputs from bluhm@, ok phessler@, florian@, bluhm@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/in_pcb.h | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_input.c | 5 | ||||
-rw-r--r-- | sys/netinet/tcp_output.c | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_subr.c | 6 |
4 files changed, 9 insertions, 10 deletions
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 8d351cf6802..9ac0f5bd0fe 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in_pcb.h,v 1.90 2015/09/22 09:34:39 vgross Exp $ */ +/* $OpenBSD: in_pcb.h,v 1.91 2015/10/24 16:08:48 mpi Exp $ */ /* $NetBSD: in_pcb.h,v 1.14 1996/02/13 23:42:00 christos Exp $ */ /* @@ -287,7 +287,7 @@ struct rtentry * int in6_pcbnotify(struct inpcbtable *, struct sockaddr_in6 *, u_int, const struct sockaddr_in6 *, u_int, u_int, int, void *, void (*)(struct inpcb *, int)); -int in6_selecthlim(struct inpcb *, struct ifnet *); +int in6_selecthlim(struct inpcb *); int in6_pcbsetport(struct in6_addr *, struct inpcb *, struct proc *); #endif /* _KERNEL */ #endif /* _NETINET_IN_PCB_H_ */ diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index f7c98b7f756..a77cc639190 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.305 2015/09/11 08:17:06 claudio Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.306 2015/10/24 16:08:48 mpi Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -4363,8 +4363,7 @@ syn_cache_respond(struct syn_cache *sc, struct mbuf *m) break; #ifdef INET6 case AF_INET6: - ip6->ip6_hlim = in6_selecthlim(NULL, - ro->ro_rt ? ro->ro_rt->rt_ifp : NULL); + ip6->ip6_hlim = in6_selecthlim(NULL); error = ip6_output(m, NULL /*XXX*/, (struct route_in6 *)ro, 0, NULL, NULL); diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index aa320da5cd9..7aa2690e21e 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_output.c,v 1.114 2015/09/11 08:17:06 claudio Exp $ */ +/* $OpenBSD: tcp_output.c,v 1.115 2015/10/24 16:08:48 mpi Exp $ */ /* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */ /* @@ -1108,7 +1108,7 @@ send: sizeof(struct ip6_hdr); packetlen = m->m_pkthdr.len; ip6->ip6_nxt = IPPROTO_TCP; - ip6->ip6_hlim = in6_selecthlim(tp->t_inpcb, NULL); + ip6->ip6_hlim = in6_selecthlim(tp->t_inpcb); #ifdef TCP_ECN if (needect) ip6->ip6_flow |= htonl(IPTOS_ECN_ECT0 << 20); diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 52744c32012..e79fcd2df1c 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.149 2015/10/02 09:51:54 tedu Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.150 2015/10/24 16:08:48 mpi Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -254,7 +254,7 @@ tcp_template(tp) ip6->ip6_nxt = IPPROTO_TCP; ip6->ip6_plen = htons(sizeof(struct tcphdr)); /*XXX*/ - ip6->ip6_hlim = in6_selecthlim(inp, NULL); /*XXX*/ + ip6->ip6_hlim = in6_selecthlim(inp); /*XXX*/ th = (struct tcphdr *)(mtod(m, caddr_t) + sizeof(struct ip6_hdr)); @@ -400,7 +400,7 @@ tcp_respond(struct tcpcb *tp, caddr_t template, struct tcphdr *th0, case AF_INET6: ip6->ip6_flow = htonl(0x60000000); ip6->ip6_nxt = IPPROTO_TCP; - ip6->ip6_hlim = in6_selecthlim(tp ? tp->t_inpcb : NULL, NULL); /*XXX*/ + ip6->ip6_hlim = in6_selecthlim(tp ? tp->t_inpcb : NULL); /*XXX*/ ip6->ip6_plen = tlen - sizeof(struct ip6_hdr); ip6->ip6_plen = htons(ip6->ip6_plen); ip6_output(m, tp ? tp->t_inpcb->inp_outputopts6 : NULL, |