From: yasuoka Date: Thu, 15 Oct 2015 13:59:21 +0000 (+0000) Subject: Fix previous. The port number is not included in sc_src and it is X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a443b7696dfaa33d9b0eebd6a7848a79e3c5350c;p=openbsd Fix previous. The port number is not included in sc_src and it is checked already at beginning of the loop. ok reyk --- diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c index 9b2ed796841..9062ce921eb 100644 --- a/sys/net/if_vxlan.c +++ b/sys/net/if_vxlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vxlan.c,v 1.30 2015/10/12 10:51:49 dlg Exp $ */ +/* $OpenBSD: if_vxlan.c,v 1.31 2015/10/15 13:59:21 yasuoka Exp $ */ /* * Copyright (c) 2013 Reyk Floeter @@ -498,8 +498,7 @@ vxlan_lookup(struct mbuf *m, struct udphdr *uh, int iphlen, scsin4 = satosin( (struct sockaddr *)&sc->sc_dst); if (srcsin4->sin_addr.s_addr == - scsin4->sin_addr.s_addr && - srcsin4->sin_port == scsin4->sin_port) + scsin4->sin_addr.s_addr) goto found; break; case AF_INET6: @@ -507,8 +506,7 @@ vxlan_lookup(struct mbuf *m, struct udphdr *uh, int iphlen, scsin6 = satosin6( (struct sockaddr *)&sc->sc_dst); if (IN6_ARE_ADDR_EQUAL( - &srcsin6->sin6_addr, &scsin6->sin6_addr) && - srcsin6->sin6_port == scsin6->sin6_port) + &srcsin6->sin6_addr, &scsin6->sin6_addr)) goto found; break; }