netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH] ipv6: handle Redirect ICMP Message with no Redirected Header option
Date: Mon, 19 Aug 2013 23:00:36 +0400	[thread overview]
Message-ID: <52126B54.4080603@cogentembedded.com> (raw)
In-Reply-To: <5211F97B.4090209@cn.fujitsu.com>

Hello.

On 08/19/2013 02:54 PM, Duan Jiong wrote:

> From: Duan Jiong <duanj.fnst@cn.fujitsu.com>

> rfc 4861 says the Redirected Header option is optional, so
> the kernel should not drop the Redirect Message that has no
> Redirected Header option. In this patch, the function
> ip6_redirect_no_header() is introduced to deal with that
> condition.

> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
[...]

> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index b70f897..9934b87 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -1178,6 +1178,27 @@ void ip6_redirect(struct sk_buff *skb, struct net *net, int oif, u32 mark)
>   }
>   EXPORT_SYMBOL_GPL(ip6_redirect);
>   
> +void ip6_redirect_no_header(struct sk_buff *skb, struct net *net, int oif, u32 mark)
> +{
> +	const struct ipv6hdr *iph = (struct ipv6hdr *) skb_network_header(skb);
> +	struct rd_msg *msg = (struct rd_msg *)skb_transport_header(skb);

   Be consistent please: either put space after a typecast or not.

> +	struct dst_entry *dst;
> +	struct flowi6 fl6;

WBR, Sergei

  parent reply	other threads:[~2013-08-19 19:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19 10:54 [PATCH] ipv6: handle Redirect ICMP Message with no Redirected Header option Duan Jiong
2013-08-19 11:55 ` Hannes Frederic Sowa
2013-08-20  1:56   ` Duan Jiong
2013-08-19 19:00 ` Sergei Shtylyov [this message]
2013-08-20  2:00   ` Duan Jiong

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=52126B54.4080603@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --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).