public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: netdev@vger.kernel.org, Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Subject: Re: [PATCH] iproute2: Ignore EADDRNOTAVAIL errors during address flush operation
Date: Mon, 23 Nov 2015 15:59:39 -0800	[thread overview]
Message-ID: <20151123155939.6664468d@xeon-e3> (raw)
In-Reply-To: <1446753257-10716-1-git-send-email-nhorman@tuxdriver.com>

On Thu,  5 Nov 2015 14:54:17 -0500
Neil Horman <nhorman@tuxdriver.com> wrote:

> I found recently that, if I disabled address promotion in the kernel, that
> ip addr flush dev <dev>
> 
> would fail with an EADDRNOTAVAIL errno (though the flush operation would in fact
> flush all addresses from an interface properly)
> 
> Whats happening is that, if I add a primary and multiple secondary addresses to
> an interface, the flush operation first ennumerates them all with a GETADDR |
> DUMP operation, then sends a delete request for each address.  But the kernel,
> having promotion disabled, deletes all secondary addresses when the primary is
> removed.  That means, that several delete requests may still be pending in the
> netlink request for addresses that have been removed on our behalf, resulting in
> EADDRNOTAVAIL return codes.
> 
> It seems the simplest thing to do is to understand that EADDRUNAVAIL isn't a
> fatal outcome on a flush operation, as it just indicates that an address which
> you want to remove is already removed, so it can safely be ignored.
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: Stephen Hemminger <stephen@networkplumber.org>
> CC: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>

Applied, thanks

      reply	other threads:[~2015-11-23 23:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05 19:54 [PATCH] iproute2: Ignore EADDRNOTAVAIL errors during address flush operation Neil Horman
2015-11-23 23:59 ` Stephen Hemminger [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=20151123155939.6664468d@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.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