version 1.1.2.10, 2011/06/08 09:27:55
|
version 1.2, 2011/06/08 12:45:41
|
Line 161 int main(int argc, char **argv)
|
Line 161 int main(int argc, char **argv)
|
closelog(); |
closelog(); |
return 2; |
return 2; |
} |
} |
|
#ifdef SIOCIFCREATE2 |
if (ioctl(s, SIOCIFCREATE2, &ifr) == -1 && errno != EEXIST) { |
if (ioctl(s, SIOCIFCREATE2, &ifr) == -1 && errno != EEXIST) { |
|
#else |
|
if (ioctl(s, SIOCIFCREATE, &ifr) == -1 && errno != EEXIST) { |
|
#endif |
syslog(LOG_ERR, "Error:: Create interface=%s ioctl(SIOCIFCREATE2) #%d - %s\n", |
syslog(LOG_ERR, "Error:: Create interface=%s ioctl(SIOCIFCREATE2) #%d - %s\n", |
MGMT_IFACE, errno, strerror(errno)); |
MGMT_IFACE, errno, strerror(errno)); |
close(s); |
close(s); |
Line 170 int main(int argc, char **argv)
|
Line 174 int main(int argc, char **argv)
|
VERB(2) syslog(LOG_NOTICE, "Info:: Created interface=%s\n", MGMT_IFACE); |
VERB(2) syslog(LOG_NOTICE, "Info:: Created interface=%s\n", MGMT_IFACE); |
// rename iface |
// rename iface |
ifr.ifr_data = MGMT_NAME; |
ifr.ifr_data = MGMT_NAME; |
|
#ifdef SIOCSIFNAME |
if (errno != EEXIST && ioctl(s, SIOCSIFNAME, &ifr) == -1) { |
if (errno != EEXIST && ioctl(s, SIOCSIFNAME, &ifr) == -1) { |
|
#else |
|
if (errno != EEXIST && ioctl(s, SIOCGIFDESCR, &ifr) == -1) { |
|
#endif |
syslog(LOG_ERR, "Error:: Managment interface=%s ioctl(SIOCSIFNAME) #%d - %s\n", |
syslog(LOG_ERR, "Error:: Managment interface=%s ioctl(SIOCSIFNAME) #%d - %s\n", |
MGMT_NAME, errno, strerror(errno)); |
MGMT_NAME, errno, strerror(errno)); |
close(s); |
close(s); |