summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbenno <benno@openbsd.org>2015-11-09 15:18:52 +0000
committerbenno <benno@openbsd.org>2015-11-09 15:18:52 +0000
commit37aa0f97f6e2e2db560a73dbcaf3c891756d20af (patch)
tree7ae77e9675f74861d4c573d5da4e2d31c3b61a32
parentRemove xfree(). From Michael W. Bombardieri. (diff)
downloadwireguard-openbsd-37aa0f97f6e2e2db560a73dbcaf3c891756d20af.tar.xz
wireguard-openbsd-37aa0f97f6e2e2db560a73dbcaf3c891756d20af.zip
use the correct rdomain when sending gre(4) keepalive packets.
bug found and fixed by Joonas Ruohonen, thanks ok claudio@ phessler@
-rw-r--r--sys/net/if_gre.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index 767e8fb886b..4d5e8f0461b 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gre.c,v 1.76 2015/10/25 11:58:11 mpi Exp $ */
+/* $OpenBSD: if_gre.c,v 1.77 2015/11/09 15:18:52 benno Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -693,6 +693,9 @@ gre_send_keepalive(void *arg)
m->m_len = m->m_pkthdr.len = sizeof(*ip) + sizeof(*gh);
MH_ALIGN(m, m->m_len);
+ /* use the interface's rdomain when sending keepalives. */
+ m->m_pkthdr.ph_rtableid = sc->sc_if.if_rdomain;
+
/* build the ip header */
ip = mtod(m, struct ip *);