]> www.infradead.org Git - users/jedix/linux-maple.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)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 22:22:00 +0000 (17:22 -0500)
commit9a7532ebe21641bfa002a5335d2cb049158d22bc
tree019236ebec67e9185f7b040c7acaae4a610410f3
parent5dc8ed79c1877d21c06f77b59b48513edbd5be2b
packet: Allow packets with only a header (but no payload)

Orabug: 25308050

[ Upstream commit 880621c2605b82eb5af91a2c94223df6f5a3fb64 ]

Commit 9c7077622dd91 ("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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 58c92f1359c6811478159cfe3cc3118bdb995608)
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
include/linux/netdevice.h
net/packet/af_packet.c