summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2013-06-13 12:17:23 +0000
committermpi <mpi@openbsd.org>2013-06-13 12:17:23 +0000
commit79a5cb720756f97c784c5e5c7f6f5f19e1c132ee (patch)
tree0734c5af83b32da94d0aa6d2b1f53ff998589f86
parentMove the local delivery code from ipv4_input() into its own function and (diff)
downloadwireguard-openbsd-79a5cb720756f97c784c5e5c7f6f5f19e1c132ee.tar.xz
wireguard-openbsd-79a5cb720756f97c784c5e5c7f6f5f19e1c132ee.zip
Merge two blocks where we drop the packet to reduce the differences with
ipv4_inpu(), no functional change. ok bluhm@
-rw-r--r--sys/netinet6/ip6_input.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index ce2a533f90e..f730fc00164 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_input.c,v 1.112 2013/04/24 10:17:08 mpi Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.113 2013/06/13 12:17:23 mpi Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -350,14 +350,9 @@ ip6_input(struct mbuf *m)
}
/* drop packets if interface ID portion is already filled */
- if ((m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK) == 0) {
- if (IN6_IS_SCOPE_EMBED(&ip6->ip6_src) &&
- ip6->ip6_src.s6_addr16[1]) {
- ip6stat.ip6s_badscope++;
- goto bad;
- }
- if (IN6_IS_SCOPE_EMBED(&ip6->ip6_dst) &&
- ip6->ip6_dst.s6_addr16[1]) {
+ if ((IN6_IS_SCOPE_EMBED(&ip6->ip6_src) && ip6->ip6_src.s6_addr16[1]) ||
+ (IN6_IS_SCOPE_EMBED(&ip6->ip6_dst) && ip6->ip6_dst.s6_addr16[1])) {
+ if ((m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK) == 0) {
ip6stat.ip6s_badscope++;
goto bad;
}