Messages in this thread | | | Date | Thu, 1 Aug 2013 15:09:06 -0600 | Subject | Invalid checksum calculated for ipv4 SYN+ACK when opt.srr is set? | From | Jeroen van Bemmel <> |
| |
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
| |