netlink: NLM_F_REPLACE not working on address???


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users netlink: NLM_F_REPLACE not working on address???
# 1  
Old 06-16-2010
netlink: NLM_F_REPLACE not working on address???

Am I missing something, or does RFC 3549 suggest that the NLM_F_REPLACE flag should apply to any netlink message header? In other words, routes/links/ipv6-lifetimes should not be the only things that can be affected by the flag.

The reason I ask is that it seems impossible (from looking at the latest iproute2 code) to enact a "change" of IP address once an interface has been defined with at least some initial IP address. I even tried creating an interface without the NLM_F_EXCL flag to see if there was an exclusivity in place preventing interface changes.

Instead, what I seem to have determined is that the IP address included in the netlink message is actually used to hash with, and as such any difference in IP address will be applied as a NLM_F_CREATE. This would appear to imply that, for all intents and purposes, there is no direct method for enacting a change-of-address to an interface... at least not with my Kernel (2.6.18-128.el5)

(NOTE: remove + add does not count as a "direct" method of changing the address, because there is - in that specific case - a potential for accidentally removing secondary addresses from the interface if they exist)

Anybody else (maybe different kernels) have a differing experience?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep -w ip address from a file isnt working need help

I have a file "file1" that contains several ip address , and the "file2" contains several records , each line in file2 contains somewhere the ip address that i am searching in the file1 I use the unix command grep -w for i in `cat file1` do grep -w "$i" file2 >> file3 done ... (9 Replies)
Discussion started by: knijjar
9 Replies

2. UNIX for Beginners Questions & Answers

Mail command not working for Long Email Address with Dashes

My company has an email user group email address name that has 35 characters in front of the @ symbol where two of them are dashes. For some reason the mail command fails to send email to this address when I invoke it from the Linux command line. I don't understand the reason for the failure. Below... (5 Replies)
Discussion started by: Phil44
5 Replies

3. Shell Programming and Scripting

Sed: deleting last line prevents '$' address from working in the multi-script invocation

It looks like if matching and deleting the last line confuses 'sed' so it does not recognize '$' address. Consider: sed -e '/^3/d' -e '$ a text' supposed to delete a line starting with '3' and then append 'text' after the last line of input. But, if it is the last line of input which starts... (2 Replies)
Discussion started by: msz59
2 Replies

4. UNIX for Advanced & Expert Users

C program to detect duplicate ip address if any after assigning ip address to ethernet interface

Hi , Could someone let me know how to detect duplicate ip address after assigning ip address to ethernet interface using c program (3 Replies)
Discussion started by: Gopi Krishna P
3 Replies

5. Shell Programming and Scripting

Search IP Address in list of ranges -- not working great

I have been struggling with a script to automate some security related activities. I have it pretty much working, all except the search. I have an input file formatted as such: 216.234.246.158 216.234.246.158 `` 24.249.221.22 24.249.221.200 `` 24.249.226.0 ... (4 Replies)
Discussion started by: tsunami4u
4 Replies

6. UNIX for Advanced & Expert Users

Bridge interface: Netlink socket notification

Hi, For one of my application(Linux 2.6) I am using a netlink socket to get the interface changes notification. socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE) Application receives netlink notification for Ethernet, bond interfaces but there is no notification about bridge interfaces changes. ... (6 Replies)
Discussion started by: learn more
6 Replies

7. IP Networking

Tracing a MAC address to IP address: Solaris

Hi there I lost connectivity to one of our remote systems and when I checked the messages log I found the following: Aug 10 23:42:34 host xntpd: time reset (step) 1.681729 s Aug 16 13:20:51 host ip: WARNING: node "mac address" is using our IP address x.x.x.x on aggr1 Aug 16 13:20:51 host... (9 Replies)
Discussion started by: notreallyhere
9 Replies

8. UNIX for Dummies Questions & Answers

Panic kernal-mode address fault on user address 0x14

:) Firstly Hi all!!, im NEW!! and on here hoping that someone might be able to offer me some help... i have a server that keeps crashing every few days with the error message: PANIC KERNAL-MODE ADDRESS FAULT ON USER ADDRESS 0X14 KERNAL PAGE FAULT FROM (CS:EIP)=(100:EF71B5BD) EAX=EF822000... (10 Replies)
Discussion started by: Twix
10 Replies

9. Solaris

How to force the IP address working right now?

Hi all! After I assigned the IP address to one machine V890, ce0 NIC, with 190.10.10.66, subnetmask is 255.255.0.0 successfully, however, when I pinged to the other machine 190.10.10.68, I did not receviced any reply message. Would you like to guide me? Thank you very much! (6 Replies)
Discussion started by: trantuananh24hg
6 Replies

10. Shell Programming and Scripting

BCC address not working (mimesender)

I modified the following mimesender script so I can send also to BCC adresses: https://www.unix.com/showthread.php?t=17065 Everything is working and correct. Except the email address(es) in BCC are not delivered. When I set the debug-mode ON I can see the BCC header and when I receive the... (1 Reply)
Discussion started by: michaelv
1 Replies
Login or Register to Ask a Question
NETLINK(3)						     Linux Programmer's Manual							NETLINK(3)

NAME
netlink - Netlink macros SYNOPSIS
#include <asm/types.h> #include <linux/netlink.h> int NLMSG_ALIGN(size_t len); int NLMSG_LENGTH(size_t len); int NLMSG_SPACE(size_t len); void *NLMSG_DATA(struct nlmsghdr *nlh); struct nlmsghdr *NLMSG_NEXT(struct nlmsghdr *nlh, int len); int NLMSG_OK(struct nlmsghdr *nlh, int len); int NLMSG_PAYLOAD(struct nlmsghdr *nlh, int len); DESCRIPTION
<linux/netlink.h> defines several standard macros to access or create a netlink datagram. They are similar in spirit to the macros defined in cmsg(3) for auxiliary data. The buffer passed to and from a netlink socket should be accessed using only these macros. NLMSG_ALIGN() Round the length of a netlink message up to align it properly. NLMSG_LENGTH() Given the payload length, len, this macro returns the aligned length to store in the nlmsg_len field of the nlmsghdr. NLMSG_SPACE() Return the number of bytes that a netlink message with payload of len would occupy. NLMSG_DATA() Return a pointer to the payload associated with the passed nlmsghdr. NLMSG_NEXT() Get the next nlmsghdr in a multipart message. The caller must check if the current nlmsghdr didn't have the NLMSG_DONE set--this function doesn't return NULL on end. The len argument is an lvalue containing the remaining length of the message buffer. This macro decrements it by the length of the message header. NLMSG_OK() Return true if the netlink message is not truncated and is in a form suitable for parsing. NLMSG_PAYLOAD() Return the length of the payload associated with the nlmsghdr. CONFORMING TO
These macros are nonstandard Linux extensions. NOTES
It is often better to use netlink via libnetlink than via the low-level kernel interface. SEE ALSO
libnetlink(3), netlink(7) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU
2014-03-20 NETLINK(3)