]> git.baikalelectronics.ru Git - kernel.git/commit
ip_gre: make ipgre_tunnel_xmit() not parse network header as IP unconditionally
authorIsaku Yamahata <yamahata@valinux.co.jp>
Thu, 20 Dec 2012 15:12:52 +0000 (15:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Dec 2012 21:14:00 +0000 (13:14 -0800)
commitaacbe0945f92712c10fc5481bfcfb387df1aa534
tree092eb88bc8d798797354bdaa8db95c26faa35f6b
parent89e54d6f2ed915e1f73341e8cc86b6d48f956786
ip_gre: make ipgre_tunnel_xmit() not parse network header as IP unconditionally

ipgre_tunnel_xmit() parses network header as IP unconditionally.
But transmitting packets are not always IP packet. For example such packet
can be sent by packet socket with sockaddr_ll.sll_protocol set.
So make the function check if skb->protocol is IP.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c