]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iproute 2.6.23 incompatibility
authorPatrick McHardy <kaber@trash.net>
Thu, 25 Oct 2007 17:46:29 +0000 (19:46 +0200)
committerStephen Hemminger <shemminger@linux-foundation.org>
Fri, 26 Oct 2007 02:09:08 +0000 (19:09 -0700)
Arkadiusz Miskiewicz wrote:
> People are reporting that
>> ip link set multicast on dev eth0 (Invalid argument)
>> no longer works when using iproute 2.6.23 on kernel 2.6.21.
>>
>> On my testing machine it also fails:
>> # ./ip link set eth0 multicast on
>> RTNETLINK answers: Invalid argument

It seems it fails to properly detect that your kernel is missing
RTM_NEWLINK support. Apparently the reason is that the kernels
I tested with return a different error in this situation.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
ip/iplink.c

index 8e0ed2ab9e3ae0fac20e957686de66b3f1bcfead..f28f91c3df79d2cad5c25153839327135189ea9b 100644 (file)
@@ -107,7 +107,8 @@ static int accept_msg(const struct sockaddr_nl *who,
 {
        struct nlmsgerr *err = (struct nlmsgerr *)NLMSG_DATA(n);
 
-       if (n->nlmsg_type == NLMSG_ERROR && err->error == -EOPNOTSUPP)
+       if (n->nlmsg_type == NLMSG_ERROR &&
+           (err->error == -EOPNOTSUPP || err->error == -EINVAL))
                have_rtnl_newlink = 0;
        else
                have_rtnl_newlink = 1;