netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wichert Akkerman <wichert@wiggy.net>
To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com
Subject: ipv6 ipsec tunnel mode produces broken packets
Date: Sun, 23 Mar 2003 11:37:49 +0100	[thread overview]
Message-ID: <20030323103748.GH21175@wiggy.net> (raw)

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

I have been playing a bit with ipv6 ipsec support on a stock 2.5.65
kernel. Transport mode seems to work excellent, and I've been able
to talk to FreeBSD and OSX boxes using it.

I can't seem to get tunnelmode to work correctly though. Here is the
config that I feed to setkey:

add 3ffe:8280:10:1d0:290:27ff:fe2d:968c 2001:888:1037::bad:c0f:fee esp 666 -m tunnel -E 3des-cbc "210987654321098765432112";
add 2001:888:1037::bad:c0f:fee 3ffe:8280:10:1d0:290:27ff:fe2d:968c esp 666 -m tunnel -E 3des-cbc "210987654321098765432112";

add 3ffe:8280:10:1d0:290:27ff:fe2d:968c 2001:888:1037::bad:c0f:fee ah 666 -m tunnel -A hmac-md5 "6543210987654321";
add 2001:888:1037::bad:c0f:fee 3ffe:8280:10:1d0:290:27ff:fe2d:968c ah 666 -m tunnel -A hmac-md5  "6543210987654321";

spdadd 3ffe:8280:10:1d0:290:27ff:fe2d:968c/128 2001:888:1037::0/48 any -P out ipsec esp/tunnel/3ffe:8280:10:1d0:290:27ff:fe2d:968c-2001:888:1037::bad:c0f:fee/require ah/tunnel/3ffe:8280:10:1d0:290:27ff:fe2d:968c-2001:888:1037::bad:c0f:fee/require;
spdadd 2001:888:1037::0/48 3ffe:8280:10:1d0:290:27ff:fe2d:968c/128 any -P in ipsec esp/tunnel/3ffe:8280:10:1d0:290:27ff:fe2d:968c-2001:888:1037::bad:c0f:fee/require ah/tunnel/3ffe:8280:10:1d0:290:27ff:fe2d:968c-2001:888:1037::bad:c0f:fee/require;

3ffe:8280:10:1d0:290:27ff:fe2d:968c is my machine, and
2001:888:1037::bad:c0f:fee is a remote FreeBSD box. When I try to ping6
the remote machine tcpdump seems some 'interesting' traffic:

11:25:40.990850 tornado.wiggy.net > prut.net: AH(spi=0x0000029a,sumlen=16,seq=0x90): truncated-ip6 - 8061 bytes missing!1037::bad:c0f:fee:0:29a > 0:90:a945:bdc0:130:338f:30b8:c5d1: ip-proto-8 8193 [class 0xe2] [flowlabel 0xd968c] (len 8193, hlim 136) [flowlabel 0x29a] (len 172, hlim 144)
11:25:42.014570 tornado.wiggy.net > prut.net: AH(spi=0x0000029a,sumlen=16,seq=0x91): truncated-ip6 - 8061 bytes missing!1037::bad:c0f:fee:0:29a > 0:91:9bc6:ed67:e7ce:8d58:ade2:2d57: ip-proto-8 8193 [class 0xe2] [flowlabel 0xd968c] (len 8193, hlim 136) [flowlabel 0x29a] (len 172, hlim 145)

8061 bytes missing from a packet strikes me as somewhat odd. If I look
at the packet with ethereal it looks as if the ESP transform produces 
incorrect data; I can see part of the destination address in the source
address. I have attached the tcpdump to this message. 

Wichert.

-- 
Wichert Akkerman <wichert@wiggy.net>           http://www.wiggy.net/
A random hacker

[-- Attachment #2: dump --]
[-- Type: application/octet-stream, Size: 32192 bytes --]

                 reply	other threads:[~2003-03-23 10:37 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=20030323103748.GH21175@wiggy.net \
    --to=wichert@wiggy.net \
    --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;
as well as URLs for NNTP newsgroup(s).