[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAOpSVYqHbQ9K0Op7NRB1vH17YOKpaGsmFkavwxTO0vu=BC3swg@mail.gmail.com>
Date: Thu, 1 Aug 2013 15:09:06 -0600
From: Jeroen van Bemmel <jvb127@...il.com>
To: linux-kernel@...r.kernel.org
Subject: Invalid checksum calculated for ipv4 SYN+ACK when opt.srr is set?
Hi,
Although rarely used and considered plain evil by some, the kernel
code allows one to use IP source routing for TCP.
In tcp_v4_send_synack the following two lines of code are used:
[...]
__tcp_v4_send_check(skb, ireq->loc_addr, ireq->rmt_addr);
[...]
err = ip_build_and_send_pkt(skb, sk, ireq->loc_addr,ireq->rmt_addr,ireq->opt);
In ip_build_and_send_pkt the 'daddr' parameter is used as follows:
iph->daddr = (opt && opt->opt.srr ? opt->opt.faddr : daddr);
It looks like the checksum may be off when (opt && opt->opt.srr ) is true?
Thanks,
Jeroen
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists