Module Name: src Committed By: maxv Date: Tue May 8 06:08:19 UTC 2018
Modified Files: src/sys/net: if_l2tp.c Log Message: Simplify: use M_MOVE_PKTHDR directly. ok knakahara@ To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/net/if_l2tp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net/if_l2tp.c diff -u src/sys/net/if_l2tp.c:1.26 src/sys/net/if_l2tp.c:1.27 --- src/sys/net/if_l2tp.c:1.26 Mon May 7 09:51:02 2018 +++ src/sys/net/if_l2tp.c Tue May 8 06:08:19 2018 @@ -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 <sys/cdefs.h> -__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 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 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; }