netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix multipoint GRE per-packet lookup in neighbour table
@ 2015-03-08  1:54 Wilco Baan Hofman
  0 siblings, 0 replies; only message in thread
From: Wilco Baan Hofman @ 2015-03-08  1:54 UTC (permalink / raw)
  To: netdev

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


>From 2092aa4525ebc29301564fd3836485781ca6b205 Mon Sep 17 00:00:00 2001
From: Wilco Baan Hofman <wilco@baanhofman.nl>
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(-)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index c9aee7d..0fdc55a 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -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) {
-- 
2.1.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-08  1:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-08  1:54 [PATCH] Fix multipoint GRE per-packet lookup in neighbour table Wilco Baan Hofman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).