From a443b7696dfaa33d9b0eebd6a7848a79e3c5350c Mon Sep 17 00:00:00 2001 From: yasuoka Date: Thu, 15 Oct 2015 13:59:21 +0000 Subject: [PATCH] Fix previous. The port number is not included in sc_src and it is checked already at beginning of the loop. ok reyk --- sys/net/if_vxlan.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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; } -- 2.20.1