2007-01-16 00:17:50 +01:00
|
|
|
--- ifenslave.c
|
|
|
|
+++ ifenslave.c
|
2010-04-25 18:41:34 +02:00
|
|
|
@@ -520,8 +520,8 @@ static int if_getconfig(char *ifname)
|
2007-01-16 00:17:50 +01:00
|
|
|
if (ioctl(skfd, SIOCGIFADDR, &ifr) < 0)
|
|
|
|
return -1;
|
|
|
|
printf("The result of SIOCGIFADDR is %2.2x.%2.2x.%2.2x.%2.2x.\n",
|
2010-04-25 18:41:34 +02:00
|
|
|
- ifr.ifr_addr.sa_data[0], ifr.ifr_addr.sa_data[1],
|
|
|
|
- ifr.ifr_addr.sa_data[2], ifr.ifr_addr.sa_data[3]);
|
|
|
|
+ ifr.ifr_addr.sa_data[2] & 0xff, ifr.ifr_addr.sa_data[3] & 0xff,
|
|
|
|
+ ifr.ifr_addr.sa_data[4] & 0xff, ifr.ifr_addr.sa_data[5] & 0xff);
|
2007-01-16 00:17:50 +01:00
|
|
|
|
|
|
|
strcpy(ifr.ifr_name, ifname);
|
|
|
|
if (ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0)
|