summaryrefslogtreecommitdiff
path: root/net/ipv4/gre_demux.c
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2014-05-14 18:11:24 (GMT)
committerScott Wood <scottwood@freescale.com>2014-05-14 18:12:24 (GMT)
commitffb069a30665ec06c05916355bc3252e33fc863b (patch)
treeba7b82696000c0f2983672d22966b83112da874e /net/ipv4/gre_demux.c
parent8d5cd1658cb0c97d5429124f9fb5caa88c460186 (diff)
parent3756888c2a2da9c7291d39cacd1184171111b49d (diff)
downloadlinux-fsl-qoriq-ffb069a30665ec06c05916355bc3252e33fc863b.tar.xz
Merge remote-tracking branch 'stable/linux-3.12.y' into sdk-v1.6.x
Signed-off-by: Scott Wood <scottwood@freescale.com> Conflicts: arch/sparc/Kconfig drivers/tty/tty_buffer.c
Diffstat (limited to 'net/ipv4/gre_demux.c')
-rw-r--r--net/ipv4/gre_demux.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv4/gre_demux.c b/net/ipv4/gre_demux.c
index 736c9fc3..0c0c1f0 100644
--- a/net/ipv4/gre_demux.c
+++ b/net/ipv4/gre_demux.c
@@ -211,6 +211,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;