[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20151013.184539.1401344867685512636.davem@davemloft.net>
Date: Tue, 13 Oct 2015 18:45:39 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: dsa@...ulusnetworks.com
Cc: netdev@...r.kernel.org, hannes@...hat.com,
nicolas.dichtel@...nd.com
Subject: Re: [PATCH net-next v5] net: ipv6: Make address flushing on ifdown
optional
From: David Ahern <dsa@...ulusnetworks.com>
Date: Mon, 12 Oct 2015 09:33:07 -0700
> Currently, all ipv6 addresses are flushed when the interface is configured
> down, including global, static addresses:
...
> Add a new sysctl to make this behavior optional. The new setting defaults to
> flush all addresses to maintain backwards compatibility. When the setting is
> reset global addresses with no expire times are not flushed:
...
> Signed-off-by: David Ahern <dsa@...ulusnetworks.com>
Here is what I really don't like about these changes: the failure
semantics are terrible.
If I add an address or a route, and some memory allocation fails, I get
a notification and see that my operation did not succeed.
But here, my routes can fail to be added during an ifup and all I will
get, at best, is a kernel log message.
This places a serious disconnect between what the user asked for and
making sure he finds out directly that his operation did not really
fully succeed.
In fact, this failure handling here during ifup leaves the interface in
a partially configured state.
There are really two ways to deal with this properly:
1) Propagate the failure back through the notifiers and fail the ifup
completely when the addrconf_dst_alloc() fails.
2) On ifdown, stash the objects away somewhere so that memory allocation
is not necessary on ifup.
Neither are really smooth approaches, but they have the attribute that
they give the user clean behavior and semantics.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists