netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wilco Baan Hofman <wilco@baanhofman.nl>
To: netdev@vger.kernel.org
Subject: [PATCH] Fix multipoint GRE per-packet lookup in neighbour table
Date: Sun, 08 Mar 2015 02:54:56 +0100	[thread overview]
Message-ID: <54FBABF0.1090706@baanhofman.nl> (raw)

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

                 reply	other threads:[~2015-03-08  1:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54FBABF0.1090706@baanhofman.nl \
    --to=wilco@baanhofman.nl \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).