netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: duanj.fnst@cn.fujitsu.com
Cc: dborkman@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH] net: gre: don't pull skb if dealing with icmp message
Date: Tue, 21 Jan 2014 16:49:04 -0800 (PST)	[thread overview]
Message-ID: <20140121.164904.1559727284192286374.davem@davemloft.net> (raw)
In-Reply-To: <52DB8E4A.7050809@cn.fujitsu.com>

From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Date: Sun, 19 Jan 2014 16:35:22 +0800

> 
> When dealing with icmp messages, the skb->data points the
> ip header that triggered the sending of the icmp message.
> 
> In gre_cisco_err(), the parse_gre_header() is called, and the
> iptunnel_pull_header() is called to pull the skb at the end of
> the parse_gre_header(). Unfortunately, the ipgre_err still needs
> the skb->data points the ip header following the icmp layer,
> and those ip addresses in ip header will be used to look up
> tunnel by ip_tunnel_lookup().
> 
> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>

Conditional pulling of headers based upon caller context leads to
impossible to maintain code.

Please find another way to fix this.

      parent reply	other threads:[~2014-01-22  0:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-19  8:35 [PATCH] net: gre: don't pull skb if dealing with icmp message Duan Jiong
2014-01-19 21:08 ` Pravin Shelar
2014-01-20  1:37   ` Duan Jiong
2014-01-21 18:27     ` Pravin Shelar
2014-01-22  0:49 ` David Miller [this message]

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=20140121.164904.1559727284192286374.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=duanj.fnst@cn.fujitsu.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).