netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: aatteka@nicira.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net] ip: generate unique IP identificator if local fragmentation is allowed
Date: Wed, 18 Sep 2013 12:20:18 -0400 (EDT)	[thread overview]
Message-ID: <20130918.122018.1088822749792394509.davem@davemloft.net> (raw)
In-Reply-To: <1379456700-8033-1-git-send-email-aatteka@nicira.com>

From: Ansis Atteka <aatteka@nicira.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.

  reply	other threads:[~2013-09-18 16:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17 22:25 [PATCH net] ip: generate unique IP identificator if local fragmentation is allowed Ansis Atteka
2013-09-18 16:20 ` David Miller [this message]
2013-09-18 16:50   ` Ansis Atteka
2013-09-18 16:55     ` David Miller

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=20130918.122018.1088822749792394509.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=aatteka@nicira.com \
    --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;
as well as URLs for NNTP newsgroup(s).