netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: liuzhiqiang26@huawei.com
Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org,
	0xeffeff@gmail.com, edumazet@google.com, netdev@vger.kernel.org,
	mingfangsen@huawei.com, zhangwenhao8@huawei.com,
	wangxiaogang3@huawei.com, zhoukang7@huawei.com,
	dsahern@gmail.com, thaller@redhat.com, maowenan@huawei.com
Subject: Re: [PATCH v2] net: fix IPv6 prefix route residue
Date: Mon, 11 Feb 2019 20:38:01 -0800 (PST)	[thread overview]
Message-ID: <20190211.203801.1570457113402893162.davem@davemloft.net> (raw)
In-Reply-To: <131bd64c-1484-39c3-d813-dde47ff4198c@huawei.com>

From: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Date: Mon, 11 Feb 2019 10:57:46 +0800

> From: Zhiqiang Liu <liuzhiqiang26@huawei.com>
> 
> Follow those steps:
>  # ip addr add 2001:123::1/32 dev eth0
>  # ip addr add 2001:123:456::2/64 dev eth0
>  # ip addr del 2001:123::1/32 dev eth0
>  # ip addr del 2001:123:456::2/64 dev eth0
> and then prefix route of 2001:123::1/32 will still exist.
> 
> This is because ipv6_prefix_equal in check_cleanup_prefix_route
> func does not check whether two IPv6 addresses have the same
> prefix length. If the prefix of one address starts with another
> shorter address prefix, even though their prefix lengths are
> different, the return value of ipv6_prefix_equal is true.
> 
> Here I add a check of whether two addresses have the same prefix
> to decide whether their prefixes are equal.
> 
> Fixes: 5b84efecb7d9 ("ipv6 addrconf: don't cleanup prefix route
> for IFA_F_NOPREFIXROUTE")
> Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
> Reported-by: Wenhao Zhang <zhangwenhao8@huawei.com>

Applied and queued up for -stable.

Please do not split up long Fixes: tag lines, keep the entire tag on
one line only.

I fixed it up for you this time.

Thanks.

  reply	other threads:[~2019-02-12  4:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-03  6:10 [PATCH] net: fix IPv6 prefix route residue Zhiqiang Liu
2019-02-03 17:04 ` David Miller
2019-02-05  3:21   ` David Ahern
2019-02-11  2:36     ` Zhiqiang Liu
2019-02-11  2:57 ` [PATCH v2] " Zhiqiang Liu
2019-02-12  4:38   ` David Miller [this message]
2019-02-12  7:43     ` Zhiqiang Liu

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=20190211.203801.1570457113402893162.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=0xeffeff@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=edumazet@google.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=liuzhiqiang26@huawei.com \
    --cc=maowenan@huawei.com \
    --cc=mingfangsen@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=thaller@redhat.com \
    --cc=wangxiaogang3@huawei.com \
    --cc=yoshfuji@linux-ipv6.org \
    --cc=zhangwenhao8@huawei.com \
    --cc=zhoukang7@huawei.com \
    /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).