X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=net%2Fipv4%2Fgre_demux.c;h=250be7421ab36c50ce00a25dcd3c659ca1c97f18;hb=fbd02dd405d0724a0f25897ed4a6813297c9b96f;hp=1863422fb7d553340151b1402ee30d4be1fcde29;hpb=53d8ab29f8f6d67e37857b68189b38fa3d87dd8e;p=~andy%2Flinux diff --git a/net/ipv4/gre_demux.c b/net/ipv4/gre_demux.c index 1863422fb7d..250be7421ab 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;