diff options
author | Martin Blumenstingl <martin.blumenstingl@googlemail.com> | 2015-11-22 17:46:09 +0100 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-07-10 23:07:01 -0400 |
commit | 58c92f1359c6811478159cfe3cc3118bdb995608 (patch) | |
tree | bc9c817dd32ff9ef4c15f770c43fbe3bb189476b /include | |
parent | 6def7a990b10af3532caed172e7ada9dbb596a53 (diff) | |
download | lwn-58c92f1359c6811478159cfe3cc3118bdb995608.tar.gz lwn-58c92f1359c6811478159cfe3cc3118bdb995608.zip |
packet: Allow packets with only a header (but no payload)
[ 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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 05b9a694e213..f6e5cad155e7 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1372,7 +1372,8 @@ enum netdev_priv_flags { * @dma: DMA channel * @mtu: Interface MTU value * @type: Interface hardware type - * @hard_header_len: Hardware header length + * @hard_header_len: Hardware header length, which means that this is the + * minimum size of a packet. * * @needed_headroom: Extra headroom the hardware may need, but not in all * cases can this be guaranteed |