From: Willem de Bruijn Date: Wed, 19 Nov 2014 18:10:16 +0000 (-0500) Subject: packet: make packet_snd fail on len smaller than l2 header X-Git-Tag: omap-for-v3.19/fixes-rc1~125^2~152 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c7077622dd917457ced680a23b7f175769471d9;p=pandora-kernel.git packet: make packet_snd fail on len smaller than l2 header When sending packets out with PF_PACKET, SOCK_RAW, ensure that the packet is at least as long as the device's expected link layer header. This check already exists in tpacket_snd, but not in packet_snd. Also rate limit the warning in tpacket_snd. Signed-off-by: Willem de Bruijn Acked-by: Eric Dumazet Acked-by: Daniel Borkmann Signed-off-by: David S. Miller --- Reading git-diff-tree failed