public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion•org>
To: Heiner Kallweit <heiner.kallweit@web•de>
Cc: "netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	jiri@resnulli•us, thaller@redhat•com
Subject: Re: ipv6: Should inet6_addr_del consider IFA_F_MANAGETEMPADDR?
Date: Tue, 8 Apr 2014 22:14:30 +0200	[thread overview]
Message-ID: <20140408201430.GD27255@order.stressinduktion.org> (raw)
In-Reply-To: <53443F5D.6030509@web.de>

[cc Jiri + Thomas]

Hi!

On Tue, Apr 08, 2014 at 08:26:37PM +0200, Heiner Kallweit wrote:
> I stumbled accross the fact that inet6_addr_add as well as inet6_addr_modify
> consider IFA_F_TEMPORARY whilst inet6_addr_del does not.
> 
> My understanding of IFA_F_MANAGETEMPADDR is that it allows userspace applications
> to deal with temporary addresses w/o having to create / track (and possibly delete)
> each and every temporary address.
> 
> This works fine when creating / modifying a global address. However when a
> global address is deleted the orphaned temporary addresses remain.
> Shouldn't the userspace be able to set IFA_F_MANAGETEMPADDR also for RTM_DELADDR
> to signalize that the kernel should delete all related temporary addresses as well?

Sure, that is possible. I guess it was not done already because
inet6_addr_del did not handle IFA_FLAGS at all. But it should be a very
tiny change to pass that flag down. Please submit an iproute patch along
with your changes.

> It would be a rather small extension to manage_tempaddrs to add a "delete" parameter
> and set valid_lft=prefered_lft=0 for each temporary address if set.

I think valid_lft=prefered_lft=0; manage_tempaddr(...);
addrconf_verify_rtnl(); is enough to clean up the old temporary address.
No need for a further flag.

> Sorry if this was discussed before and I miss something.

I don't remember a discussion about that. ;)

Bye,

  Hannes

  parent reply	other threads:[~2014-04-08 20:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-08 18:26 ipv6: Should inet6_addr_del consider IFA_F_MANAGETEMPADDR? Heiner Kallweit
2014-04-08 19:08 ` Heiner Kallweit
2014-04-08 20:14 ` Hannes Frederic Sowa [this message]
2014-04-09 19:38   ` Heiner Kallweit
2014-04-09 20:36     ` Hannes Frederic Sowa

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=20140408201430.GD27255@order.stressinduktion.org \
    --to=hannes@stressinduktion$(echo .)org \
    --cc=heiner.kallweit@web$(echo .)de \
    --cc=jiri@resnulli$(echo .)us \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=thaller@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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