diff options
author | 2015-11-11 10:23:23 +0000 | |
---|---|---|
committer | 2015-11-11 10:23:23 +0000 | |
commit | 5e9a6f6c0847c3c556b6904c110e113d5a7fd7c9 (patch) | |
tree | 0f37a8e0259508318032cc5c4aa2d2b2a4606d9c /sys/netinet6 | |
parent | Kill useless IFQ_POLL(). (diff) | |
download | wireguard-openbsd-5e9a6f6c0847c3c556b6904c110e113d5a7fd7c9.tar.xz wireguard-openbsd-5e9a6f6c0847c3c556b6904c110e113d5a7fd7c9.zip |
Store the index of the lo0 interface instead of a pointer to its
descriptor.
Allow to get rid of two if_ref() in the output paths.
ok dlg@
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/ip6_input.c | 4 | ||||
-rw-r--r-- | sys/netinet6/ip6_output.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 5fe4f880d5a..3479082b849 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_input.c,v 1.150 2015/10/29 16:04:10 tedu Exp $ */ +/* $OpenBSD: ip6_input.c,v 1.151 2015/11/11 10:23:23 mpi Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -202,7 +202,7 @@ ip6_input(struct mbuf *m) } else { if (m->m_next) { if (m->m_flags & M_LOOP) { - ip6stat.ip6s_m2m[lo0ifp->if_index]++; /*XXX*/ + ip6stat.ip6s_m2m[lo0ifidx]++; /*XXX*/ } else if (ifp->if_index < nitems(ip6stat.ip6s_m2m)) ip6stat.ip6s_m2m[ifp->if_index]++; else diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index b9c5dc3c01b..c14909eb0fa 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_output.c,v 1.198 2015/11/03 21:39:34 chl Exp $ */ +/* $OpenBSD: ip6_output.c,v 1.199 2015/11/11 10:23:23 mpi Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -549,7 +549,7 @@ reroute: goto bad; } if (ISSET(rt->rt_flags, RTF_LOCAL)) - ifp = if_ref(lo0ifp); + ifp = if_get(lo0ifidx); else ifp = if_get(rt->rt_ifidx); } else { |