dont bail in net_interface_config_get if address query fails (e.g. vmnic1)
This commit is contained in:
parent
90c1298705
commit
05624b41cb
@ -67,6 +67,7 @@ JNI_OnLoad(JavaVM *vm, void *reserved)
|
|||||||
"log=dmalloc-sigar.log";
|
"log=dmalloc-sigar.log";
|
||||||
}
|
}
|
||||||
dmalloc_debug_setup(options);
|
dmalloc_debug_setup(options);
|
||||||
|
fprintf(stderr, "DMALLOC_OPTIONS=%s\n", options);
|
||||||
#endif
|
#endif
|
||||||
return JNI_VERSION_1_2;
|
return JNI_VERSION_1_2;
|
||||||
}
|
}
|
||||||
|
@ -10,12 +10,12 @@ if (@ARGV) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
my(@argv);
|
my(@argv);
|
||||||
my $nargs = 126;
|
my $nargs = 26;
|
||||||
my $arglen = 256;
|
my $arglen = 4256;
|
||||||
my $arg = 'a';
|
my $arg = 'a';
|
||||||
for (my $i=0; $i<$nargs; $i++) {
|
for (my $i=0; $i<$nargs; $i++) {
|
||||||
push @argv, $arg++ x $arglen;
|
push @argv, $arg++ x $arglen;
|
||||||
}
|
}
|
||||||
|
print "$^X $0\n";
|
||||||
exec $^X, $0, @argv;
|
exec $^X, $0, @argv or die $!;
|
||||||
}
|
}
|
||||||
|
@ -1182,11 +1182,6 @@ int sigar_net_interface_config_get(sigar_t *sigar, const char *name,
|
|||||||
if (!ioctl(sock, SIOCGIFADDR, &ifr)) {
|
if (!ioctl(sock, SIOCGIFADDR, &ifr)) {
|
||||||
ifconfig->address = ifr_s_addr(ifr);
|
ifconfig->address = ifr_s_addr(ifr);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
/* if this one failed, so will everything else */
|
|
||||||
close(sock);
|
|
||||||
return errno;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ioctl(sock, SIOCGIFNETMASK, &ifr)) {
|
if (!ioctl(sock, SIOCGIFNETMASK, &ifr)) {
|
||||||
ifconfig->netmask = ifr_s_addr(ifr);
|
ifconfig->netmask = ifr_s_addr(ifr);
|
||||||
|
Loading…
Reference in New Issue
Block a user