]> git.baikalelectronics.ru Git - kernel.git/commit
packet: Allow packets with only a header (but no payload)
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sun, 22 Nov 2015 16:46:09 +0000 (17:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Nov 2015 03:17:17 +0000 (22:17 -0500)
commitd852161ae131473c16856cb59e1ace880f75de7e
treeb1a1799ef943f2aa04d35530e47dae15282cb2ab
parentf48978a9c888a27765c7a5d770ed1a1eeeced1e3
packet: Allow packets with only a header (but no payload)

Commit 5c7eb7015a4d1 ("packet: make packet_snd fail on len smaller
than l2 header") added validation for the packet size in packet_snd.
This change enforces that every packet needs a header (with at least
hard_header_len bytes) plus a payload with at least one byte. Before
this change the payload was optional.

This fixes PPPoE connections which do not have a "Service" or
"Host-Uniq" configured (which is violating the spec, but is still
widely used in real-world setups). Those are currently failing with the
following message: "pppd: packet size is too short (24 <= 24)"

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/packet/af_packet.c