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/netinet6/in6_src.c | |
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/netinet6/in6_src.c')
-rw-r--r-- | sys/netinet6/in6_src.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index dfe5791948f..045a4e38fb8 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_src.c,v 1.66 2015/10/24 12:33:16 mpi Exp $ */ +/* $OpenBSD: in6_src.c,v 1.67 2015/10/24 16:08:48 mpi Exp $ */ /* $KAME: in6_src.c,v 1.36 2001/02/06 04:08:17 itojun Exp $ */ /* @@ -470,14 +470,12 @@ in6_selectif(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, * 3. The system default hoplimit. */ int -in6_selecthlim(struct inpcb *in6p, struct ifnet *ifp) +in6_selecthlim(struct inpcb *in6p) { if (in6p && in6p->inp_hops >= 0) return (in6p->inp_hops); - else if (ifp) - return (ND_IFINFO(ifp)->chlim); - else - return (ip6_defhlim); + + return (ip6_defhlim); } /* |