All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vividh Siddha <vividh@ipinfusion.com>
To: jamal <hadi@cyberus.ca>
Cc: netdev@oss.sgi.com, "David S. Miller" <davem@redhat.com>
Subject: Re: PROBLEM: Interface address change netlink socket problem.(Patch
Date: Wed, 09 Oct 2002 21:23:51 -0700	[thread overview]
Message-ID: <3DA500D7.8000704@ipinfusion.com> (raw)
In-Reply-To: Pine.GSO.4.30.0210092235300.16149-100000@shell.cyberus.ca

Thats true but we are working around a problem which exists in the Linux 
stack. Ideally when we set only a interface address, the netmask should 
remain the same as it was before. Also the default netmasks based on 
classes might not be what is set. If we set netmask as /23, then:

ifconfig eth0 10.10.10.50

will cause the netmask to be /8. The end result of all of these is correct but the intermediate messages can cause problems in higher layer protocols.

vividh

jamal wrote:

>Moved to netdev where it belongs. Vividh in the future please post
>to netdev or at least cross-post to it ... because the kernel list
>FAQ says so.
>
>In your posting you say:
>  
>
>>Imagine a interface eth0 with address 10.10.10.10, netmask 0xffffff00
>>and broadcast 10.10.10.255.
>>
>>For eg: if the following command is issued:
>>ifconfig eth0 10.10.10.50 netmask 0xffffff00 broadcast 10.10.10.255
>>
>>The kernel sends the following three sets of messages on the netlink
>>socket:
>>
>>Interface address delete: (with address 10.10.10.10)
>>Interface address add   : (with address 10.10.10.50)
>>
>>Interface address delete: (with address 10.10.10.50)
>>Interface address add   : (with address 10.10.10.50)
>>
>>Interface address delete: (with address 10.10.10.50)
>>Interface address add   : (with address 10.10.10.50)
>>
>>Ideally as only the interface address is changed only one address
>>delete/add should be sent.
>>    
>>
>
>State is not maintained in user space. You change that IP address,
>it actually gets deleted then a new one added. The bcast and netmask
>changeto defaults  as a result; you then change the netmask and
>broadcast with each requiring a call from user space. If you modify your
>netlink program to print both net and broadcast address you should see
>this. BTW, you MUST check for these.
>
>Example try just:
>ifconfig eth0 10.10.10.50
>
>and after you change it try:
>ifconfig eth0 10.10.10.50 netmask 0xffffff00
>
>and then
>ifconfig eth0 10.10.10.50 netmask 0xffffff00 broadcast 10.10.10.255
>
>cheers,
>jamal
>
>
>  
>

  reply	other threads:[~2002-10-10  4:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-10  2:46 PROBLEM: Interface address change netlink socket problem.(Patch jamal
2002-10-10  4:23 ` Vividh Siddha [this message]
2002-10-10 12:03   ` jamal

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=3DA500D7.8000704@ipinfusion.com \
    --to=vividh@ipinfusion.com \
    --cc=davem@redhat.com \
    --cc=hadi@cyberus.ca \
    --cc=netdev@oss.sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.