Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Need FIX for: RTNETLINK answers: Invalid argument Post 302284078 by Pudnik on Wednesday 4th of February 2009 05:12:28 PM
Old 02-04-2009
Tools Problem...SOLVED for everyone :)

...I figured out what this is. When RTNETLINK tells you that one or more 'answers' are invalid, what it *really* means is that one or more lines in the /etc/sysconfig/network-scripts/ifcfg-eth# configuration file, where # is 0,1,2, and the like, are incorrect.

So, THE FIX IS:

...as root, edit the file and comment out just about all the lines in it except the type, device, and hwaddr lines, save it, and then wait a few moments. If it comes back with a 'you are connected' message, then one or more lines in the file that you commented out are incorrect or unnecessary for the type of connection you've got.

Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

stty: : Invalid argument

Hello Everyone; I have a script that is throwing the following message: stty: : Invalid argument The line that gives the message is the following, sailormoon$ scp home/voice.xml newwave@silvermoon:/newwave/config/radius stty: : Invalid argument voice.xml | ... (2 Replies)
Discussion started by: tony3101
2 Replies

2. Solaris

ps: 65535 is an invalid non-numeric argument for -p option

I want to figure out what is the reason of error message I have in Solaris 10. Why Solaris 10 dosn't recognize 65535? ps: 65535 is an invalid non-numeric argument for -p option usage: ps 'format' is one or more of: Thank you (5 Replies)
Discussion started by: gogogo
5 Replies

3. UNIX for Dummies Questions & Answers

msgrcv : Invalid argument

Hi All, Please guide me how to get rid : msgrcv : Invalid argument. I am using message queues: msgsnd and msgrcv, I am able to send through msgsnd and receive through msgrcv, but at times i get the belo error. msgrcv : Invalid argument. (1 Reply)
Discussion started by: answers
1 Replies

4. Solaris

Invalid Argument and glassfish

I tried to install glassfish on Solaris 10 and it worked fine on other instances. I got the below message bash-3.00# ./sjsas-9_1_01-solaris-sparc.bin -console bash: ./sjsas-9_1_01-solaris-sparc.bin: Invalid argument I logged on as root and the file has execute permission. So strange. Do... (1 Reply)
Discussion started by: Andrew2008
1 Replies

5. IP Networking

sendto invalid argument

Hi I lost a lot of time in understanding the message "sendto Invalid argument" when I execute the following code. This code is a simple UDP sender improved with some reliability feature. My goal is to send a file. I've reported only the code which may be useful. Can anyone help me? Thank you... (0 Replies)
Discussion started by: Puntino
0 Replies

6. UNIX for Advanced & Expert Users

invalid argument in semctl()

When I am using the function semctl() it is giving me error as the INVALID ARGUMENT. Can any body give me the possible reasons??? (2 Replies)
Discussion started by: asimibm
2 Replies

7. Programming

SIOCSARP: Invalid Argument.

Hello everybody, I've been programming an alternative to linux's standard 'arp' program. I can delete arp entries (SIOCDARP), get arp entries (SIOCGARP), but i'm having troubles setting entries with ioctl. I can't set any PERM, USETRAILERS, or COM address. It only adds PUB entries and i don't... (2 Replies)
Discussion started by: semash!
2 Replies

8. SuSE

Routing RTNETLINK answers: No such process

Hello, I have a opensuse Linux server with two nics. eth0 = internal network with 172.16.1.24 eth1 = external network with ip 172.19.3.2 Internal networks: 172.16.0.0/16, 172.17.0.0/16 and 192.168.0.0/16. External network: 172.19.3.0/16 The default gateway is 172.19.3.1 on eth1. ... (3 Replies)
Discussion started by: felix123
3 Replies

9. UNIX for Advanced & Expert Users

NFS : Invalid argument (Remote share mounting issue)

Hi Guru's, I am unable to mount NFS share on unix system (DG/UX) which is nfs client. Error: mount: /nfsshare: Invalid argument mount: giving up on: /mountpoint i tried following command mount -t nfs remotehost:/nfsshare /mountpoint Error: (5 Replies)
Discussion started by: Justin John
5 Replies

10. UNIX for Beginners Questions & Answers

Mount error in Linux: invalid argument

hi i have an android phone which i think is bricked, so wanted to see what the actual issue is, I flashed it with TWRP recovery image and launched terminal i, was able understand that mount is not happening, it says invalid argument and no such file or directory. Below is what i get while... (32 Replies)
Discussion started by: nanz143
32 Replies
RTNETLINK(3)						     Linux Programmer's Manual						      RTNETLINK(3)

NAME
rtnetlink - macros to manipulate rtnetlink messages SYNOPSIS
#include <asm/types.h> #include <linux/netlink.h> #include <linux/rtnetlink.h> #include <sys/socket.h> rtnetlink_socket = socket(AF_NETLINK, int socket_type, NETLINK_ROUTE); int RTA_OK(struct rtattr *rta, int rtabuflen); void *RTA_DATA(struct rtattr *rta); unsigned int RTA_PAYLOAD(struct rtattr *rta); struct rtattr *RTA_NEXT(struct rtattr *rta, unsigned int rtabuflen); unsigned int RTA_LENGTH(unsigned int length); unsigned int RTA_SPACE(unsigned int length); DESCRIPTION
All rtnetlink(7) messages consist of a netlink(7) message header and appended attributes. The attributes should be manipulated only using the macros provided here. RTA_OK(rta, attrlen) returns true if rta points to a valid routing attribute; attrlen is the running length of the attribute buffer. When not true then you must assume there are no more attributes in the message, even if attrlen is nonzero. RTA_DATA(rta) returns a pointer to the start of this attribute's data. RTA_PAYLOAD(rta) returns the length of this attribute's data. RTA_NEXT(rta, attrlen) gets the next attribute after rta. Calling this macro will update attrlen. You should use RTA_OK to check the validity of the returned pointer. RTA_LENGTH(len) returns the length which is required for len bytes of data plus the header. RTA_SPACE(len) returns the amount of space which will be needed in a message with len bytes of data. CONFORMING TO
These macros are nonstandard Linux extensions. BUGS
This manual page is incomplete. EXAMPLE
Creating a rtnetlink message to set the MTU of a device: #include <linux/rtnetlink.h> ... struct { struct nlmsghdr nh; struct ifinfomsg if; char attrbuf[512]; } req; struct rtattr *rta; unsigned int mtu = 1000; int rtnetlink_sk = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); memset(&req, 0, sizeof(req)); req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); req.nh.nlmsg_flags = NLM_F_REQUEST; req.nh.nlmsg_type = RTM_NEWLINK; req.if.ifi_family = AF_UNSPEC; req.if.ifi_index = INTERFACE_INDEX; req.if.ifi_change = 0xffffffff; /* ??? */ rta = (struct rtattr *)(((char *) &req) + NLMSG_ALIGN(req.nh.nlmsg_len)); rta->rta_type = IFLA_MTU; rta->rta_len = RTA_LENGTH(sizeof(unsigned int)); req.nh.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) + RTA_LENGTH(sizeof(mtu)); memcpy(RTA_DATA(rta), &mtu, sizeof(mtu)); send(rtnetlink_sk, &req, req.nh.nlmsg_len, 0); SEE ALSO
netlink(3), netlink(7), rtnetlink(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-09-06 RTNETLINK(3)
All times are GMT -4. The time now is 06:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy