public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Ludvig <michal@logix.cz>
To: "David S. Miller" <davem@redhat.com>
Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org
Subject: [PATCH] SIT tunnels over IPsec
Date: Fri, 16 Jan 2004 19:38:00 +0100	[thread overview]
Message-ID: <40082F88.9030705@logix.cz> (raw)

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

Hi!

The attached patch fixes IPv6-in-IPv4 (SIT) tunnel over IPsec. Without 
it the SIT packets originated from the same host as the IPsec endpoint 
is leave the interface unencrypted and of course the tunnel doesn't 
work. The patch fixes it. Tested.

Please apply.

Thanks,

Michal Ludvig
-- 
* A mouse is a device used to point at the xterm you want to type in.
* Personal homepage - http://www.logix.cz/michal


[-- Attachment #2: kernel-sit.diff --]
[-- Type: text/plain, Size: 856 bytes --]

--- linux-2.6.1.orig/net/ipv6/sit.c	2004-01-09 08:00:03.000000000 +0100
+++ linux-2.6.1/net/ipv6/sit.c	2004-01-16 09:51:13.000000000 +0100
@@ -485,7 +485,8 @@ static int ipip6_tunnel_xmit(struct sk_b
 					      { .daddr = dst,
 						.saddr = tiph->saddr,
 						.tos = RT_TOS(tos) } },
-				    .oif = tunnel->parms.link };
+				    .oif = tunnel->parms.link,
+				    .proto = IPPROTO_IPV6 };
 		if (ip_route_output_key(&rt, &fl)) {
 			tunnel->stat.tx_carrier_errors++;
 			goto tx_error_icmp;
@@ -757,7 +758,8 @@ static int ipip6_tunnel_init(struct net_
 					      { .daddr = iph->daddr,
 						.saddr = iph->saddr,
 						.tos = RT_TOS(iph->tos) } },
-				    .oif = tunnel->parms.link };
+				    .oif = tunnel->parms.link,
+				    .proto = IPPROTO_IPV6 };
 		struct rtable *rt;
 		if (!ip_route_output_key(&rt, &fl)) {
 			tdev = rt->u.dst.dev;


             reply	other threads:[~2004-01-16 18:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-16 18:38 Michal Ludvig [this message]
2004-01-20  5:19 ` [PATCH] SIT tunnels over IPsec David S. 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=40082F88.9030705@logix.cz \
    --to=michal@logix.cz \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    /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