From f5ad45f87877fcd11e8c1db35a6c54cf76983f85 Mon Sep 17 00:00:00 2001 From: maxv Date: Tue, 8 May 2018 06:08:19 +0000 Subject: [PATCH] Simplify: use M_MOVE_PKTHDR directly. ok knakahara@ --- sys/net/if_l2tp.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sys/net/if_l2tp.c b/sys/net/if_l2tp.c index bdeaea6d6e81..c03eca929b73 100644 --- a/sys/net/if_l2tp.c +++ b/sys/net/if_l2tp.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_l2tp.c,v 1.26 2018/05/07 09:51:02 maxv Exp $ */ +/* $NetBSD: if_l2tp.c,v 1.27 2018/05/08 06:08:19 maxv Exp $ */ /* * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.26 2018/05/07 09:51:02 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.27 2018/05/08 06:08:19 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -506,7 +506,7 @@ l2tp_input(struct mbuf *m, struct ifnet *ifp) m_freem(m); return; } - M_COPY_PKTHDR(m_head, m); + M_MOVE_PKTHDR(m_head, m); /* * m_head should be: @@ -530,11 +530,6 @@ l2tp_input(struct mbuf *m, struct ifnet *ifp) if (m->m_len == 0) { m_head->m_next = m_free(m); } else { - /* - * Already copied mtag with M_COPY_PKTHDR. - * but don't delete mtag in case cut off M_PKTHDR flag - */ - m_remove_pkthdr(m); m_head->m_next = m; }