From: Phil Sutter <phil@nwl.cc>
To: Thomas Haller <thaller@redhat.com>
Cc: netdev@vger.kernel.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCH iproute2] ip-address: properly display zero IPv4 peer address
Date: Wed, 11 Nov 2015 12:34:02 +0100 [thread overview]
Message-ID: <20151111113402.GQ26876@orbit.nwl.cc> (raw)
In-Reply-To: <1445502868-29474-1-git-send-email-thaller@redhat.com>
On Thu, Oct 22, 2015 at 10:34:28AM +0200, Thomas Haller wrote:
> Kernel allows for zero IPv4 peer addresses (IFA_ADDRESS):
>
> ip address add 192.168.5.1 peer 0.0.0.0/24 dev dummy
>
> which is distinct from a usual address like:
>
> ip address add 192.168.5.1/24 dev dummy
> ip address add 192.168.5.1 peer 192.168.5.1/24 dev dummy
>
> For IPv4, a missing IFA_ADDRESS attribute means that the peer
> is 0.0.0.0. See inet_fill_ifaddr(), which does:
>
> if ((ifa->ifa_address &&
> nla_put_in_addr(skb, IFA_ADDRESS, ifa->ifa_address)) ||
>
> Signed-off-by: Thomas Haller <thaller@redhat.com>
Acked-by: Phil Sutter <phil@nwl.cc>
I wonder why this is not the case for IPv6. What is the functional
effect of setting a zero peer with non-zero netmask?
Cheers, Phil
next prev parent reply other threads:[~2015-11-11 11:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 8:34 [PATCH iproute2] ip-address: properly display zero IPv4 peer address Thomas Haller
2015-11-11 11:34 ` Phil Sutter [this message]
2015-11-24 0:04 ` Stephen Hemminger
2015-11-24 11:44 ` Phil Sutter
2015-11-24 12:14 ` Thomas Haller
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=20151111113402.GQ26876@orbit.nwl.cc \
--to=phil@nwl.cc \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=thaller@redhat.com \
/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).