netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: "Marek Behún" <kabel@kernel.org>, "Pali Rohár" <pali@kernel.org>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	linux-kernel@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Phil Sutter <phil@nwl.cc>
Subject: Re: Issues during assigning addresses on point to point interfaces
Date: Thu, 24 Jun 2021 14:57:41 +0200	[thread overview]
Message-ID: <d3995a21-d9fe-9393-a10e-8eddccec2f47@6wind.com> (raw)
In-Reply-To: <20210624124545.2b170258@dellmb>

Le 24/06/2021 à 12:45, Marek Behún a écrit :
> On Sun, 6 Jun 2021 17:10:08 +0200
> Pali Rohár <pali@kernel.org> wrote:
> 
>> Hello!
>>
>> Seems that there is a bug during assigning IP addresses on point to
>> point interfaces.
>>
>> Assigning just one local address works fine:
>>
>>     ip address add fe80::6 dev ppp1 --> inet6 fe80::6/128 scope link
>>
>> Assigning both local and remote peer address also works fine:
>>
>>     ip address add fe80::7 peer fe80::8 dev ppp1 ---> inet6 fe80::7
>> peer fe80::8/128 scope link
>>
>> But trying to assign just remote peer address does not work. Moreover
>> "ip address" call does not fail, it returns zero but instead of
>> setting remote peer address, it sets local address:
>>
>>     ip address add peer fe80::5 dev ppp1 --> inet6 fe80::5/128 scope
>> link
>>
> 
> Adding some other people to Cc in order to get their opinions.
> 
> It seems this bug is there from the beginning, from commit
> caeaba79009c2 ("ipv6: add support of peer address")
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=caeaba79009c2
> 
> Maybe some older user-space utilities use IFA_ADDRESS instead of
> IFA_LOCAL, and this was done in order to be compatible with them?
If I remember well, there was an issue in the uAPI.
IFA_LOCAL is supposed to be the address of the interface and IFA_ADDRESS is
supposed to be the endpoint of a point-to-point interface.
However, in case of IPv6, it was not the case. In netlink messages generated by
the kernel, IFA_ADDRESS was used instead of IFA_LOCAL.
The patch tried to keep the backward compatibility and the symmetry between msg
from userland and notification from the kernel.


Regards,
Nicolas

  reply	other threads:[~2021-06-24 12:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-06 15:10 Issues during assigning addresses on point to point interfaces Pali Rohár
2021-06-24 10:45 ` Marek Behún
2021-06-24 12:57   ` Nicolas Dichtel [this message]
2021-06-25  8:40     ` Pali Rohár
2021-06-25 15:06       ` Nicolas Dichtel
2021-06-25 15:27         ` Pali Rohár
2021-06-25 15:32           ` Nicolas Dichtel

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=d3995a21-d9fe-9393-a10e-8eddccec2f47@6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kabel@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pali@kernel.org \
    --cc=phil@nwl.cc \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=stephen@networkplumber.org \
    --cc=yoshfuji@linux-ipv6.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).