diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2014-03-24 06:06:36 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-26 20:18:40 +0100 |
commit | fbd02dd405d0724a0f25897ed4a6813297c9b96f (patch) | |
tree | 4ebae2c7d156ffa99c1c6ec2d14a8061d0a7b742 /net/ipv4/gre_demux.c | |
parent | Merge branch 'nfsd-next' of git://linux-nfs.org/~bfields/linux (diff) | |
download | linux-fbd02dd405d0724a0f25897ed4a6813297c9b96f.tar.xz linux-fbd02dd405d0724a0f25897ed4a6813297c9b96f.zip |
ip_tunnel: Fix dst ref-count.
Commit 10ddceb22ba (ip_tunnel:multicast process cause panic due
to skb->_skb_refdst NULL pointer) removed dst-drop call from
ip-tunnel-recv.
Following commit reintroduce dst-drop and fix the original bug by
checking loopback packet before releasing dst.
Original bug: https://bugzilla.kernel.org/show_bug.cgi?id=70681
CC: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/gre_demux.c')
-rw-r--r-- | net/ipv4/gre_demux.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv4/gre_demux.c b/net/ipv4/gre_demux.c index 1863422fb7d5..250be7421ab3 100644 --- a/net/ipv4/gre_demux.c +++ b/net/ipv4/gre_demux.c @@ -182,6 +182,14 @@ static int gre_cisco_rcv(struct sk_buff *skb) int i; bool csum_err = false; +#ifdef CONFIG_NET_IPGRE_BROADCAST + if (ipv4_is_multicast(ip_hdr(skb)->daddr)) { + /* Looped back packet, drop it! */ + if (rt_is_output_route(skb_rtable(skb))) + goto drop; + } +#endif + if (parse_gre_header(skb, &tpi, &csum_err) < 0) goto drop; |