ifconfig: do not accept "ifconfig eth0 up 1.2.3.4/17" (ip with mask). Closes 5786

function                                             old     new   delta
ifconfig_main                                       1221    1237     +16

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2013-01-20 18:10:12 +01:00
parent 2f5b5beb28
commit 31dc8603ee
2 changed files with 81 additions and 88 deletions

View file

@ -435,7 +435,7 @@ static NOINLINE void INET6_setroute(int action, char **args)
struct ifreq ifr;
memset(&ifr, 0, sizeof(ifr));
strncpy_IFNAMSIZ(ifr.ifr_name, devname);
xioctl(skfd, SIOGIFINDEX, &ifr);
xioctl(skfd, SIOCGIFINDEX, &ifr);
rt.rtmsg_ifindex = ifr.ifr_ifindex;
}