Fix multipoint GRE per-packet lookup in neighbour table
Subsystems (3)
PATCH 1/1 Fix multipoint GRE per-packet lookup in neighbour table
Hi all,
For multipoint GRE, there is no CAP_XMIT, because it is determined per-packet if the destination can be reached.
In the transmit function though, it still only checks against CAP_XMIT.
This patch fixes that, and allows forwarding via GRE through the neighbour table.
After patch, this works:
$ ip -6 neigh list|grep fe80::3 fe80::3 dev gre1 lladdr fc:00:00:00:00:00:00:00:00:00:00:00:00:00:00:03 STALE
$ ping6 fe80::3%gre1 PING fe80::3%gre1(fe80::3) 56 data bytes 64 bytes from fe80::3: icmp_seq=1 ttl=64 time=0.750 ms
-- Wilco Baan Hofman
Quoted 1 line
From
2092aa4525ebc29301564fd3836485781ca6b205Mon Sep 17 00:00:00 2001
From: Wilco Baan Hofman <[email protected]>
Date: Sun, 8 Mar 2015 02:47:22 +0100
Subject: [PATCH] Fix multipoint GRE (per packet transmit)
--- net/ipv6/ip6_gre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/ip6_gre.c +0 -0
@@ -902,7 +902,7 @@ static netdev_tx_t ip6gre_tunnel_xmit(struct sk_buff
*skb,
struct net_device_stats *stats = &t->dev->stats;
int ret;- if (!ip6_tnl_xmit_ctl(t, &t->parms.laddr, &t->parms.raddr))
+ if (!ip6_tnl_xmit_ctl(t, &t->parms.laddr, &t->parms.raddr) &&
!(t->parms.flags & IP6_TNL_F_CAP_PER_PACKET))
goto tx_err;
switch (skb->protocol) {Signature · 1 line
2.1.4