netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <dlezcano@fr.ibm.com>
To: "Denis V. Lunev" <den@sw.ru>
Cc: davem@davemloft.net, "Denis V. Lunev" <den@openvz.org>,
	netdev@vger.kernel.org, devel@openvz.org,
	containers@lists.osdl.org
Subject: Re: [PATCH 3/7 net-2.6.25] [IPV4]: Prohibit assignment of 0.0.0.0 as interface address.
Date: Fri, 25 Jan 2008 16:12:44 +0100	[thread overview]
Message-ID: <4799FC6C.5040705@fr.ibm.com> (raw)
In-Reply-To: <4799FC69.9030809@sw.ru>

Denis V. Lunev wrote:
> Daniel Lezcano wrote:
>> Denis V. Lunev wrote:
>>> Daniel Lezcano wrote:
>>>> Denis V. Lunev wrote:
>>>>> I could hardly imagine why sombady needs to assign 0.0.0.0 as an
>>>>> interface
>>>>> address or interface destination address. The kernel will behave in a
>>>>> strage
>>>>> way in several places if this is possible, as ifa_local != 0 is
>>>>> considered
>>>>> as initialized/non-initialized state of the ifa.
>>>> AFAICS, we should be able to set at an interface address to 0.0.0.0, in
>>>> order to remove an IP address from an interface and keep this one up.
>>>> I see two trivial cases:
>>>>  * remove the ipv4 on an interface but continue to use it through ipv6
>>>>  * move ipv4 address from the interface to an attached bridge
>>> For this case there is an IOCTL/netlink "remove IP address".
>> And I forgot to mention the general broadcast.
>> This is need for the dhcp protocol. If you are not able to set your
>> interface to 0.0.0.0, you will be not able to send a 255.255.255.255
>> broadcast message to have your IP address.
>>
> 
> OK. Dave, pls disregard this patch. I suspect that others in the set
> should not intersect with this one.
> 
> To summarize the discussion:
> there is the only reason for this assignment: old IOCTL interface does
> not have a way to remove IP address except this, though netlink has a
> method for it that's why I am a little bit confused :)
> 
> This is handled in the __inet_insert_ifa: ifa is just removed there and,
> correctly, ifa with 0.0.0.0 address can't exists in the kernel.

Yes, my last statement is false.

  reply	other threads:[~2008-01-25 15:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25 13:51 [PATCH 1/7 net-2.6.25] [IPV4]: Fix memory leak on error path during FIB initialization Denis V. Lunev
2008-01-25 13:51 ` [PATCH 2/7 net-2.6.25] [IPV4]: Small style cleanup of the error path in rtm_to_ifaddr Denis V. Lunev
2008-01-25 13:51 ` [PATCH 3/7 net-2.6.25] [IPV4]: Prohibit assignment of 0.0.0.0 as interface address Denis V. Lunev
2008-01-25 14:01   ` Daniel Lezcano
2008-01-25 14:13     ` Denis V. Lunev
2008-01-25 14:37       ` Daniel Lezcano
2008-01-25 14:48       ` Daniel Lezcano
2008-01-25 15:12         ` Denis V. Lunev
2008-01-25 15:12           ` Daniel Lezcano [this message]
2008-01-25 16:34   ` Stephen Hemminger
2008-01-25 13:52 ` [PATCH 4/7 net-2.6.25] [NETNS]: Process interface address manipulation routines in the namespace Denis V. Lunev
2008-01-25 13:52 ` [PATCH 5/7 net-2.6.25] [IPV4]: fib_sync_down rework Denis V. Lunev
2008-01-25 13:52 ` [PATCH 6/7 net-2.6.25] [NETNS]: Add a namespace mark to fib_info Denis V. Lunev
2008-01-25 13:52 ` [PATCH 7/7 net-2.6.25] [NETNS]: Lookup in FIB semantic hashes taking into account the namespace Denis V. Lunev

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=4799FC6C.5040705@fr.ibm.com \
    --to=dlezcano@fr.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=davem@davemloft.net \
    --cc=den@openvz.org \
    --cc=den@sw.ru \
    --cc=devel@openvz.org \
    --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).