Netdev List
 help / color / mirror / Atom feed
From: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
To: netdev@vger.kernel.org
Subject: checksum of lsrr
Date: Wed, 04 Jul 2007 22:28:24 +0900 (JST)	[thread overview]
Message-ID: <20070704.222824.74749937.chamas@h4.dion.ne.jp> (raw)

Hello,
I tried source routing with netcat just for my interest but it did
not work. tcpdump output follows:

00:07:40:53:bd:55 > 00:01:8e:b3:82:1c, ethertype IPv4 (0x0800),
  length 86: (tos 0x0, ttl  64, id 50437, offset 0, flags [DF],
  proto: TCP (6), length: 72, options (LSRR 172.27.129.2 172.27.129.2,NOP))
  172.27.129.129.44281 > 172.27.129.1.3333:
  S, cksum 0xc434 (correct), 561806820:561806820(0) win 5840 <mss 1460,sackOK,timestamp 112865 0,nop,wscale 6>

00:01:8e:b3:82:1c > 00:e0:81:29:d1:7d, ethertype IPv4 (0x0800),
  length 86: (tos 0x0, ttl  63, id 50437, offset 0, flags [DF],
  proto: TCP (6), length: 72, options (LSRR 172.27.129.1, 172.27.129.2,NOP))
  172.27.129.129.44281 > 172.27.129.2.3333:
  S, cksum 0xc434 (correct), 561806820:561806820(0) win 5840 <mss 1460,sackOK,timestamp 112865 0,nop,wscale 6>

00:e0:81:29:d1:7d > 00:01:8e:b3:82:1c, ethertype IPv4 (0x0800),
  length 82: (tos 0x0, ttl  64, id 0, offset 0, flags [DF],
  proto: TCP (6), length: 68, options (LSRR 172.27.129.129,EOL))
  172.27.129.2.3333 > 172.27.129.1.44281:
  S, cksum 0xc35b (correct), 183283162:183283162(0) ack 561806821 win 5792 <mss 1460,sackOK,timestamp 673831 112865,nop,wscale 6>

00:01:8e:b3:82:1c > 00:07:40:53:bd:55, ethertype IPv4 (0x0800),
  length 82: (tos 0x0, ttl  63, id 0, offset 0, flags [DF],
  proto: TCP (6), length: 68, options (LSRR 172.27.129.1,,EOL))
  172.27.129.2.3333 > 172.27.129.129.44281:
  S, cksum 0xc35b (incorrect (-> 0xc3db), 183283162:183283162(0) ack 561806821 win 5792 <mss 1460,sackOK,timestamp 673831 112865,nop,wscale 6>

the last line says checksum is incorrect, then I saw
ip_options_rcv_rcv_srr() in ip_options.c:

		memcpy(&iph->daddr, &optptr[srrptr-1], 4);
		opt->is_changed = 1;
	}
	if (srrptr <= srrspace) {

if we change destination address, we need recompute not only ip
checksum but also tcp's, don't we? 

thanks,

             reply	other threads:[~2007-07-04 13:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-04 13:28 Ken-ichirou MATSUZAWA [this message]
2007-07-22 15:31 ` checksum of lsrr Ken-ichirou MATSUZAWA
2007-08-18 13:18   ` Ken-ichirou MATSUZAWA

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=20070704.222824.74749937.chamas@h4.dion.ne.jp \
    --to=chamas@h4.dion.ne.jp \
    --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