netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dwalter@barracuda.com
Cc: netdev@vger.kernel.org
Subject: Re: ipv6: Add support for RTA_PREFSRC
Date: Wed, 06 Apr 2011 18:37:16 -0700 (PDT)	[thread overview]
Message-ID: <20110406.183716.226766155.davem@davemloft.net> (raw)
In-Reply-To: <1301903804.31789.234.camel@localhost>

From: Daniel Walter <dwalter@barracuda.com>
Date: Mon, 4 Apr 2011 09:56:44 +0200

> On Fri, 2011-04-01 at 20:46 -0700, David Miller wrote:
>> You can't change the layout of "struct in6_rtmsg", as that structure
>> is explicitly exported to user space and changing it will break every
>> application out there.
> 
> Hi,
> 
> I've kicked support for setting the preferred source via ioctl,
> to keep "struct in6_rtmsg" untouched.
> This reduces the RTA_PREFSRC support to netlink only, unless
> we break the struct.
> 
> Do you see any other way around this problem?

This is fine, adding new feature support to deprecated things like
the ioctl routing calls is undesirable anyways.

Since you do the prefsrc extraction in at least two places, make a
helper function that does the whole "if prefsrc.plen use prefsrc, else
use ipv6_dev_get_saddr()"

This would be akin to ipv4's FIB_RES_PREFSRC

  reply	other threads:[~2011-04-07  1:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-02  3:46 ipv6: Add support for RTA_PREFSRC David Miller
2011-04-04  7:56 ` Daniel Walter
2011-04-07  1:37   ` David Miller [this message]
2011-04-07  9:23     ` Daniel Walter
2011-04-07 20:27       ` David Miller
2011-04-07 21:25     ` Florian Westphal
2011-04-11  7:22       ` Daniel Walter
2011-04-11  7:58         ` Florian Westphal

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=20110406.183716.226766155.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dwalter@barracuda.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).