lkml.org 
[lkml]   [2002]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PROBLEM: Interface address change netlink socket problem.(Patch attached)
When you give
ifconfig eth0 10.10.10.50 netmask 0xffffff00 broadcast 10.10.10.255

It first calls devinet_ioctl() with cmd as SIOCSIFADDR. In this we reset
netmask and broadcast address.

When devinet_ioctl() is called with SIOCSIFBRDADDR, the check for old
address and new address suceeds as we changed the broadcast
address(whereas it is unchanged). This then calls inet_del_ifa(delete
notification) and then inet_insert_ifa(add notification).

Similarly when devinet_ioctl() is called with SIOCSIFNETMASK.

I tested this with the netlink socket with the patch applied and it
works as expected.

Thanks,
vividh

David S. Miller wrote:
> Can you explain how not initializing some fields of the 'ifa'
> prevents the extra netlink messages? I don't understand how
> your patch works.
>
>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.044 / U:3.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site