diff options
-rw-r--r-- | sys/net/if_sec.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/net/if_sec.c b/sys/net/if_sec.c index 99e79b56833..7e4e5f57f38 100644 --- a/sys/net/if_sec.c +++ b/sys/net/if_sec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sec.c,v 1.9 2023/12/23 10:52:54 bluhm Exp $ */ +/* $OpenBSD: if_sec.c,v 1.10 2024/01/24 00:17:01 dlg Exp $ */ /* * Copyright (c) 2022 The University of Queensland @@ -315,6 +315,14 @@ sec_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, } } + mtag = m_tag_get(PACKET_TAG_GRE, sizeof(ifp->if_index), M_NOWAIT); + if (mtag == NULL) { + error = ENOBUFS; + goto drop; + } + *(int *)(mtag + 1) = ifp->if_index; + m_tag_prepend(m, mtag); + m->m_pkthdr.ph_family = dst->sa_family; error = if_enqueue(ifp, m); |