Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net fix to remove trailing garbage
details: https://anonhg.NetBSD.org/src/rev/06f9c11ba69b
branches: trunk
changeset: 1016626:06f9c11ba69b
user: yamaguchi <yamaguchi%NetBSD.org@localhost>
date: Wed Nov 25 10:38:10 2020 +0000
description:
fix to remove trailing garbage
diffstat:
sys/net/if_pppoe.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 40172f315bc1 -r 06f9c11ba69b sys/net/if_pppoe.c
--- a/sys/net/if_pppoe.c Wed Nov 25 10:37:04 2020 +0000
+++ b/sys/net/if_pppoe.c Wed Nov 25 10:38:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pppoe.c,v 1.155 2020/11/25 10:37:04 yamaguchi Exp $ */
+/* $NetBSD: if_pppoe.c,v 1.156 2020/11/25 10:38:10 yamaguchi Exp $ */
/*
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.155 2020/11/25 10:37:04 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.156 2020/11/25 10:38:10 yamaguchi Exp $");
#ifdef _KERNEL_OPT
#include "pppoe.h"
@@ -1144,6 +1144,8 @@
if (m->m_pkthdr.len < plen)
goto drop;
+ /* ignore trailing garbage */
+ m_adj(m, plen - m->m_pkthdr.len);
/*
* Fix incoming interface pointer (not the raw ethernet interface
* anymore)
Home |
Main Index |
Thread Index |
Old Index