summaryrefslogtreecommitdiff
path: root/bpf_comp.c
AgeCommit message (Expand)AuthorFilesLines
2013-07-12bpf_comp: pass NEED_TCPDUMP_LIKE_FILTER through gccDaniel Borkmann1-2/+0
2013-07-09configure: fix multiple issues in build configurationDaniel Borkmann1-0/+3
2013-05-05bpf_comp: minor: fix linebreakDaniel Borkmann1-2/+2
2013-03-15all: import netsniff-ng 0.5.8-rc0 sourceDaniel Borkmann1-0/+43
git/commit/net?h=nds-private-remove&id=217e6fa24ce28ec87fca8da93c9016cb78028612'>217e6fa24ce28ec87fca8da93c9016cb78028612 (patch) tree1964e4821fd14a8255df061419fc2e8745bc92e7 /net parentd7426c69a1942b2b9b709bf66b944ff09f561484 (diff)
net: introduce device min_header_len
The stack must not pass packets to device drivers that are shorter than the minimum link layer header length. Previously, packet sockets would drop packets smaller than or equal to dev->hard_header_len, but this has false positives. Zero length payload is used over Ethernet. Other link layer protocols support variable length headers. Support for validation of these protocols removed the min length check for all protocols. Introduce an explicit dev->min_header_len parameter and drop all packets below this value. Initially, set it to non-zero only for Ethernet and loopback. Other protocols can follow in a patch to net-next. Fixes: 9ed988cd5915 ("packet: validate variable length ll headers") Reported-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Signed-off-by: Willem de Bruijn <willemb@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ethernet/eth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c