diff options
| author | Willem de Bruijn <willemb@google.com> | 2017-02-07 15:57:21 -0500 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-07-04 11:51:33 +0200 |
| commit | 0458cb3e231dcab869c765a9509660383b83ff33 (patch) | |
| tree | 81d522b6ccbf53a2a3007752e7bd617454147055 /lib/flex_array.c | |
| parent | 81bdc97a16cb396cc748108a5042709b00713e75 (diff) | |
packet: round up linear to header len
commit 57031eb794906eea4e1c7b31dc1e2429c0af0c66 upstream.
Link layer protocols may unconditionally pull headers, as Ethernet
does in eth_type_trans. Ensure that the entire link layer header
always lies in the skb linear segment. tpacket_snd has such a check.
Extend this to packet_snd.
Variable length link layer headers complicate the computation
somewhat. Here skb->len may be smaller than dev->hard_header_len.
Round up the linear length to be at least as long as the smallest of
the two.
[js] no virtio helpers in 3.12
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'lib/flex_array.c')
0 files changed, 0 insertions, 0 deletions
