From e0c077b4ae2af1033ae68483240bcafd270f6d43 Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Sat, 24 Oct 2015 16:08:49 +0000 Subject: 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@ --- sys/netinet6/raw_ip6.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sys/netinet6/raw_ip6.c') diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 9727c64aa6e..75e52bc40b8 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip6.c,v 1.85 2015/10/19 12:11:28 mpi Exp $ */ +/* $OpenBSD: raw_ip6.c,v 1.86 2015/10/24 16:08:48 mpi Exp $ */ /* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */ /* @@ -344,7 +344,6 @@ rip6_output(struct mbuf *m, ...) u_int plen = m->m_pkthdr.len; int error = 0; struct ip6_pktopts opt, *optp = NULL, *origoptp; - struct ifnet *oifp = NULL; int type, code; /* for ICMPv6 output statistics only */ int priv = 0; va_list ap; @@ -421,8 +420,6 @@ rip6_output(struct mbuf *m, ...) goto bad; ip6->ip6_src = *in6a; - if (rtisvalid(in6p->inp_route6.ro_rt)) - oifp = in6p->inp_route6.ro_rt->rt_ifp; } ip6->ip6_flow = in6p->inp_flowinfo & IPV6_FLOWINFO_MASK; @@ -432,7 +429,7 @@ rip6_output(struct mbuf *m, ...) ip6->ip6_plen = htons((u_short)plen); #endif ip6->ip6_nxt = in6p->inp_ipv6.ip6_nxt; - ip6->ip6_hlim = in6_selecthlim(in6p, oifp); + ip6->ip6_hlim = in6_selecthlim(in6p); if (so->so_proto->pr_protocol == IPPROTO_ICMPV6 || in6p->inp_cksum6 != -1) { -- cgit v1.2.3