]> git.proxmox.com Git - mirror_iproute2.git/commit
ip: fix exit codes
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 13 Oct 2011 15:38:33 +0000 (08:38 -0700)
committerStephen Hemminger <shemminger@vyatta.com>
Thu, 13 Oct 2011 15:38:33 +0000 (08:38 -0700)
commit7397944de6c11519a5951fc1bcff20225e71c4bd
treeb5547801447f1ba1b94d79f0c97ffc85f6b49eaa
parent788731b320f87db9dc99638d2e3cf94bca245c6d
ip: fix exit codes

Alternative fix to problem reported by: Bin Li
The issue is came from https://bugzilla.novell.com/show_bug.cgi?id=681952.

In any previous version (since suse ... 10.0?), ip addr add always returned
the error code 2 in case the ip address is already set on the interface:

    inet 172.16.2.3/24 brd 172.16.2.255 scope global bond0
RTNETLINK answers: File exists
2

On 11.4, it returns the exit code 254:

    inet 172.16.1.1/24 brd 172.16.1.255 scope global eth0
RTNETLINK answers: File exists
254

This of course causes ifup to return an error in this quite common case..
ip/ip.c