diff options
author | 2018-04-08 00:39:34 +0000 | |
---|---|---|
committer | 2018-04-08 00:39:34 +0000 | |
commit | 0fee6d67df5d801faa70c25f93f0adc6d11467ad (patch) | |
tree | 7a0e3d25423b17c2904ce08345c2e64ad3397df3 | |
parent | Only attach a single PHY if the PHY address isn't specified. This prevents (diff) | |
download | wireguard-openbsd-0fee6d67df5d801faa70c25f93f0adc6d11467ad.tar.xz wireguard-openbsd-0fee6d67df5d801faa70c25f93f0adc6d11467ad.zip |
on output, actually attach the mbuf tag to packet.
this is to suppress loops over the interface, and avoids a leak of
the tag on every packet.
found and fix testd by christian barthel
also tested by job snijders
ok bluhm@
-rw-r--r-- | sys/net/if_gif.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 78c77efd206..32f02a65c83 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gif.c,v 1.113 2018/03/15 21:01:18 remi Exp $ */ +/* $OpenBSD: if_gif.c,v 1.114 2018/04/08 00:39:34 dlg Exp $ */ /* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */ /* @@ -403,6 +403,8 @@ gif_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, error = ENOBUFS; goto drop; } + memcpy((caddr_t)(mtag + 1), &ifp->if_index, sizeof(ifp->if_index)); + m_tag_prepend(m, mtag); m->m_pkthdr.ph_family = dst->sa_family; |