Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/net Pull up following revision(s) (requested by ozaki...
details: https://anonhg.NetBSD.org/src/rev/34febfc198db
branches: netbsd-6
changeset: 776950:34febfc198db
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Apr 16 09:27:32 2015 +0000
description:
Pull up following revision(s) (requested by ozaki-r in ticket #1286):
sys/net/if_vlan.c: revision 1.80
Correct frame padding length
vlan pads a frame with zeros up to 68 bytes
(ETHER_MIN_LEN + ETHER_VLAN_ENCAP_LEN). It expects
that even if the frame is untagged, it keeps 64 bytes
at least. However, it lacks concern about CRC
(4 bytes). So a sending frame can be 72 (68 + 4) bytes.
PR 49788
diffstat:
sys/net/if_vlan.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 41e04fb5949c -r 34febfc198db sys/net/if_vlan.c
--- a/sys/net/if_vlan.c Thu Apr 16 08:56:11 2015 +0000
+++ b/sys/net/if_vlan.c Thu Apr 16 09:27:32 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vlan.c,v 1.69.8.2 2014/11/03 20:38:09 msaitoh Exp $ */
+/* $NetBSD: if_vlan.c,v 1.69.8.3 2015/04/16 09:27:32 msaitoh Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.69.8.2 2014/11/03 20:38:09 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.69.8.3 2015/04/16 09:27:32 msaitoh Exp $");
#include "opt_inet.h"
@@ -791,9 +791,10 @@
* after deleting a tag.
*/
if (m->m_pkthdr.len <
- (ETHER_MIN_LEN + ETHER_VLAN_ENCAP_LEN)) {
+ (ETHER_MIN_LEN - ETHER_CRC_LEN +
+ ETHER_VLAN_ENCAP_LEN)) {
m_copyback(m, m->m_pkthdr.len,
- (ETHER_MIN_LEN +
+ (ETHER_MIN_LEN - ETHER_CRC_LEN +
ETHER_VLAN_ENCAP_LEN) -
m->m_pkthdr.len,
vlan_zero_pad_buff);
Home |
Main Index |
Thread Index |
Old Index