From: Philip Craig <philipc@snapgear.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, Patrick McHardy <kaber@trash.net>
Subject: Re: [PATCH 4/4] gre: Add Transparent Ethernet Bridging
Date: Thu, 09 Oct 2008 18:43:21 +1000 [thread overview]
Message-ID: <48EDC429.5090502@snapgear.com> (raw)
In-Reply-To: <E1KnpaS-0004Pe-Qt@gondolin.me.apana.org.au>
[-- Attachment #1: Type: text/plain, Size: 719 bytes --]
Thanks for doing this work, much appreciated.
I haven't tested your patches yet, but when I was attempting this,
I needed the attached patch to get it to work with bridging and
netfilter, otherwise gre tries to call
skb->dst->ops->update_pmtu(skb->dst, mtu);
Herbert Xu wrote:
> @@ -530,7 +572,13 @@ static int ipgre_rcv(struct sk_buff *skb)
> dst_release(skb->dst);
> skb->dst = NULL;
> nf_reset(skb);
> +
> + if (tunnel->dev->type == ARPHRD_ETHER)
> + skb->protocol = eth_type_trans(skb, skb->dev);
Do you need to check pskb_may_pull(skb, ETH_HLEN)?
> +
> + skb_reset_network_header(skb);
> ipgre_ecn_decapsulate(iph, skb);
> +
> netif_rx(skb);
> read_unlock(&ipgre_lock);
> return(0);
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1028 bytes --]
--- linux-2.6.x/net/bridge/br_netfilter.c 18 Jun 2006 23:30:55 -0000 1.1.1.25
+++ linux-2.6.x/net/bridge/br_netfilter.c 11 Aug 2006 04:10:04 -0000
@@ -765,14 +765,28 @@ out:
return NF_STOLEN;
}
+/*
+ * We've finished passing through netfilter, so we can remove the fake dst.
+ * This is required by some lower layers, eg ip_gre
+ */
+static int br_nf_dev_queue_xmit_finish(struct sk_buff *skb)
+{
+ if (skb->dst == (struct dst_entry *)&__fake_rtable) {
+ dst_release(skb->dst);
+ skb->dst = NULL;
+ }
+
+ return br_dev_queue_push_xmit(skb);
+}
+
static int br_nf_dev_queue_xmit(struct sk_buff *skb)
{
if (skb->protocol == htons(ETH_P_IP) &&
skb->len > skb->dev->mtu &&
!(skb_shinfo(skb)->ufo_size || skb_shinfo(skb)->tso_size))
- return ip_fragment(skb, br_dev_queue_push_xmit);
+ return ip_fragment(skb, br_nf_dev_queue_xmit_finish);
else
- return br_dev_queue_push_xmit(skb);
+ return br_nf_dev_queue_xmit_finish(skb);
}
/* PF_BRIDGE/POST_ROUTING ********************************************/
next prev parent reply other threads:[~2008-10-09 8:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-09 7:04 [0/4] gre: Ethernet over GRE Herbert Xu
2008-10-09 7:05 ` [PATCH 1/4] gre: Use needed_headroom Herbert Xu
2008-10-09 7:05 ` [PATCH 2/4] gre: Move MTU setting out of ipgre_tunnel_bind_dev Herbert Xu
2008-10-09 7:05 ` [PATCH 3/4] gre: Add netlink interface Herbert Xu
2008-10-09 7:05 ` [PATCH 4/4] gre: Add Transparent Ethernet Bridging Herbert Xu
2008-10-09 8:43 ` Philip Craig [this message]
2008-10-09 10:39 ` Herbert Xu
2008-11-24 6:49 ` bridge: Fix update_pmtu crash with GRE Herbert Xu
2008-11-24 12:35 ` Patrick McHardy
2008-10-09 11:21 ` [PATCH 4/4] gre: Add Transparent Ethernet Bridging Herbert Xu
2008-10-09 7:08 ` ip: gre: Add GRE configuration support through rtnl_link Herbert Xu
2008-10-11 13:03 ` Herbert Xu
2008-10-09 11:23 ` [PATCH 5/4] inet: Make tunnel RX/TX byte counters more consistent Herbert Xu
2008-10-09 19:03 ` David Miller
2008-10-09 12:12 ` [0/4] gre: Ethernet over GRE Patrick McHardy
2008-10-09 19:01 ` David Miller
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=48EDC429.5090502@snapgear.com \
--to=philipc@snapgear.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=kaber@trash.net \
--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).