netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Herbert <therbert@google.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH net-next 2/5] sit: Set inner IP protocol in sit
Date: Fri, 26 Sep 2014 09:22:31 -0700	[thread overview]
Message-ID: <1411748554-7346-3-git-send-email-therbert@google.com> (raw)
In-Reply-To: <1411748554-7346-1-git-send-email-therbert@google.com>

Call skb_set_inner_ipproto to set inner IP protocol to IPPROTO_IPV6
before tunnel_xmit. This is needed if UDP encapsulation (fou) is
being done.

Signed-off-by: Tom Herbert <therbert@google.com>
---
 net/ipv6/sit.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index db75809..0d4e274 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -982,6 +982,8 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
 		goto tx_error;
 	}
 
+	skb_set_inner_ipproto(skb, IPPROTO_IPV6);
+
 	err = iptunnel_xmit(skb->sk, rt, skb, fl4.saddr, fl4.daddr,
 			    protocol, tos, ttl, df,
 			    !net_eq(tunnel->net, dev_net(dev)));
@@ -1006,6 +1008,8 @@ static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
 	if (IS_ERR(skb))
 		goto out;
 
+	skb_set_inner_ipproto(skb, IPPROTO_IPIP);
+
 	ip_tunnel_xmit(skb, dev, tiph, IPPROTO_IPIP);
 	return NETDEV_TX_OK;
 out:
-- 
2.1.0.rc2.206.gedb03e5

  parent reply	other threads:[~2014-09-26 16:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 16:22 [PATCH net-next 0/5] udp: Generalize GSO for UDP tunnels Tom Herbert
2014-09-26 16:22 ` [PATCH net-next 1/5] udp: Generalize skb_udp_segment Tom Herbert
2014-09-26 16:22 ` Tom Herbert [this message]
2014-09-26 16:22 ` [PATCH net-next 3/5] ipip: Set inner IP protocol in ipip Tom Herbert
2014-09-26 16:22 ` [PATCH net-next 4/5] gre: Set inner protocol in v4 and v6 GRE transmit Tom Herbert
2014-09-30  5:02   ` Simon Horman
2014-09-26 16:22 ` [PATCH net-next 5/5] vxlan: Set inner protocol before transmit Tom Herbert
2014-09-26 20:16 ` [PATCH net-next 0/5] udp: Generalize GSO for UDP tunnels Or Gerlitz
2014-09-26 23:04   ` Tom Herbert
2014-09-27 19:26     ` Or Gerlitz
2014-09-29  3:59       ` Tom Herbert
2014-09-29 20:43 ` 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=1411748554-7346-3-git-send-email-therbert@google.com \
    --to=therbert@google.com \
    --cc=davem@davemloft.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).