[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130918.122018.1088822749792394509.davem@davemloft.net>
Date: Wed, 18 Sep 2013 12:20:18 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: aatteka@...ira.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net] ip: generate unique IP identificator if local
fragmentation is allowed
From: Ansis Atteka <aatteka@...ira.com>
Date: Tue, 17 Sep 2013 15:25:00 -0700
> @@ -1317,6 +1317,7 @@ struct sk_buff *__ip_make_skb(struct sock *sk,
> ttl = ip_select_ttl(inet, &rt->dst);
>
> iph = (struct iphdr *)skb->data;
> +
> iph->version = 4;
> iph->ihl = 5;
> iph->tos = inet->tos;
> @@ -1324,7 +1325,7 @@ struct sk_buff *__ip_make_skb(struct sock *sk,
> iph->ttl = ttl;
> iph->protocol = sk->sk_protocol;
> ip_copy_addrs(iph, fl4);
> - ip_select_ident(iph, &rt->dst, sk);
> + ip_select_ident(skb, &rt->dst, sk);
>
> if (opt) {
> iph->ihl += opt->optlen>>2;
This transformation is not equivalent.
ip_select_ident() is going to use ip_hdr() which obtains the header
pointer via skb_network_header().
But here, the code is using skb->data for this, which is different.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists