summaryrefslogtreecommitdiffstats
path: root/sys/net/if_vxlan.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2018-12-03 17:25:22 +0000
committerclaudio <claudio@openbsd.org>2018-12-03 17:25:22 +0000
commit0e1f74ccdf01225c02e6b5340ea917d86d6d0647 (patch)
treecf60c3733b2045d8e2c2eb6443a21ba8de641e9a /sys/net/if_vxlan.c
parentSend SSL_AD_DECODE alerts in the case of a bad hello request or an (diff)
downloadwireguard-openbsd-0e1f74ccdf01225c02e6b5340ea917d86d6d0647.tar.xz
wireguard-openbsd-0e1f74ccdf01225c02e6b5340ea917d86d6d0647.zip
Convert more MH_ALIGN() to m_align(). Also switch from m_gethdr/M_GETHDR
calls to m_get/M_GET calls because M_MOVE_PKTHDR() is initialising the pkthdr and so it is not needed when allocation the header. OK bluhm@
Diffstat (limited to 'sys/net/if_vxlan.c')
-rw-r--r--sys/net/if_vxlan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
index 307b3902d59..0cfc0878bc8 100644
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vxlan.c,v 1.69 2018/11/15 22:22:03 dlg Exp $ */
+/* $OpenBSD: if_vxlan.c,v 1.70 2018/12/03 17:25:22 claudio Exp $ */
/*
* Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org>
@@ -867,8 +867,8 @@ vxlan_output(struct ifnet *ifp, struct mbuf *m)
uint32_t tag;
struct mbuf *m0;
- /* VXLAN header */
- MGETHDR(m0, M_DONTWAIT, m->m_type);
+ /* VXLAN header, needs new mbuf because of alignment issues */
+ MGET(m0, M_DONTWAIT, m->m_type);
if (m0 == NULL) {
ifp->if_oerrors++;
return (ENOBUFS);
@@ -876,7 +876,7 @@ vxlan_output(struct ifnet *ifp, struct mbuf *m)
M_MOVE_PKTHDR(m0, m);
m0->m_next = m;
m = m0;
- MH_ALIGN(m, sizeof(*vu));
+ m_align(m, sizeof(*vu));
m->m_len = sizeof(*vu);
m->m_pkthdr.len += sizeof(*vu);