From: Jiri Pirko <jiri@resnulli.us>
To: Roy Marples <roy@marples.name>
Cc: Hannes Frederic Sowa <hannes@redhat.com>, netdev@vger.kernel.org
Subject: Re: [PATCH] ipv6: do not add link-local address if one already exists
Date: Wed, 13 Aug 2014 19:10:27 +0200 [thread overview]
Message-ID: <20140813171027.GC1869@nanopsycho.orion> (raw)
In-Reply-To: <5734a020ebb2bd95d61ba282243719bd@mail.marples.name>
Mon, Aug 11, 2014 at 11:22:04PM CEST, roy@marples.name wrote:
>Hi
>
>On 2014-08-11 01:11, Hannes Frederic Sowa wrote:
>>On Mo, 2014-08-11 at 00:05 +0000, Roy Marples wrote:
>>>On 2014-08-10 20:37, Hannes Frederic Sowa wrote:
>>>> On So, 2014-08-10 at 19:56 +0000, Roy Marples wrote:
>>>>> Currently the kernel will always add an IPv6 link-local address
>>>>> based on the hardware address when the interface is brought up.
>>>>> This is probably based on the assumption that userland would
>>>>> never add one before the interface is brought up.
>>>>>
>>>>> However, one at least one userland application (dhcpcd) does this so
>>>>> it can implement RFC7217 which can be used for link-local addresses
>>>>> as well.
>>>>>
>>>>> Attached is a patch which checks to see if a link-local address exists
>>>>> before indiscriminately adding one.
>>>>
>>>> Please have a look at:
>>>> https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=bc91b0f07ada5535427373a4e2050877bcc12218
>>>>
>>>> This was recently implemented just for this specific case.
>>>
>>>Is that tunable available in /proc or /sys?
>>>I'm not overly keen on adding a netlink call just for that in dhcpcd, it
>>>would be a lot of bloat compared to the kernel patch.
>>
>>Can you call iproute via a script? Would that fit your needs?
>>https://git.kernel.org/cgit/linux/kernel/git/shemminger/iproute2.git/commit/?h=net-next&id=ff7c20844049be836c10087cb2418b99ff36ca2b
>
>Not really as there is no guarantee iproute2 is installed on the host.
>For now, I've added a netlink call at the expense of around 400 bytes.
The iface to idev->addr_gen_mode can be certainly added to sysfs. Feel
free to do so.
>
>Thanks
>
>Roy
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-08-13 17:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-10 19:56 [PATCH] ipv6: do not add link-local address if one already exists Roy Marples
2014-08-10 20:37 ` Hannes Frederic Sowa
2014-08-11 0:05 ` Roy Marples
2014-08-11 0:11 ` Hannes Frederic Sowa
2014-08-11 21:22 ` Roy Marples
2014-08-13 17:10 ` Jiri Pirko [this message]
2014-08-11 0:27 ` YOSHIFUJI Hideaki
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=20140813171027.GC1869@nanopsycho.orion \
--to=jiri@resnulli.us \
--cc=hannes@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=roy@marples.name \
/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).