summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2015-12-04 12:32:07 +0000
committerreyk <reyk@openbsd.org>2015-12-04 12:32:07 +0000
commitc686b35379c965f68c3af42b21ee608a8a20ef08 (patch)
tree9ca747b8241af969e186bb006c77db9c4545b85a
parentSync after rt_mask() removal. (diff)
downloadwireguard-openbsd-c686b35379c965f68c3af42b21ee608a8a20ef08.tar.xz
wireguard-openbsd-c686b35379c965f68c3af42b21ee608a8a20ef08.zip
Reject input when either the version is wrong or the pad is non-zero;
not when the version is wrong and the pad is non-zero. OK goda@
-rw-r--r--sys/net/if_etherip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/if_etherip.c b/sys/net/if_etherip.c
index c9b1cc57c8a..bb1fe94aa57 100644
--- a/sys/net/if_etherip.c
+++ b/sys/net/if_etherip.c
@@ -470,7 +470,7 @@ ip_etherip_input(struct mbuf *m, ...)
}
eip = mtod(m, struct etherip_header *);
- if (eip->eip_ver != ETHERIP_VERSION && eip->eip_pad) {
+ if (eip->eip_ver != ETHERIP_VERSION || eip->eip_pad) {
etheripstat.etherip_adrops++;
m_freem(m);
return;