summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2020-11-03 04:47:01 +0000
committerdlg <dlg@openbsd.org>2020-11-03 04:47:01 +0000
commita19526b27b46e6daf6a6769821a3591602da0976 (patch)
treedf2df306cb74829d9038f473ba199aecc4718b0e
parentCorrect comment typo in previous (diff)
downloadwireguard-openbsd-a19526b27b46e6daf6a6769821a3591602da0976.tar.xz
wireguard-openbsd-a19526b27b46e6daf6a6769821a3591602da0976.zip
replace the nvgre node when the endpoint ip changes.
this helps nvgre follow things like carp masters changing on the inside of the virtual network. "makes sense" jmatthew@
-rw-r--r--sys/net/if_gre.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index b297b64ad6b..cb5beeaad62 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gre.c,v 1.160 2020/08/28 12:01:48 mvs Exp $ */
+/* $OpenBSD: if_gre.c,v 1.161 2020/11/03 04:47:01 dlg Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -1470,7 +1470,7 @@ nvgre_input_map(struct nvgre_softc *sc, const struct gre_tunnel *key,
nv->nv_age = ticks;
if (nv->nv_type != NVGRE_ENTRY_DYNAMIC ||
- gre_ip_cmp(key->t_af, &key->t_dst, &nv->nv_gateway))
+ gre_ip_cmp(key->t_af, &key->t_dst, &nv->nv_gateway) == 0)
nv = NULL;
else
refcnt_take(&nv->nv_refs);