|
|
45db86 |
diff --git a/ifconfig.c.old b/ifconfig.c
|
|
|
45db86 |
index 2b8cbbb..6505e07 100644
|
|
|
45db86 |
--- a/ifconfig.c.old
|
|
|
45db86 |
+++ b/ifconfig.c
|
|
|
45db86 |
@@ -967,8 +967,9 @@ int main(int argc, char **argv)
|
|
|
45db86 |
if (ap->herror)
|
|
|
45db86 |
ap->herror(host);
|
|
|
45db86 |
else
|
|
|
45db86 |
- fprintf(stderr,_("ifconfig: error resolving '%s' to set address for af=%s\n"), host, ap->name); fprintf(stderr,
|
|
|
45db86 |
- _("ifconfig: `--help' gives usage information.\n")); exit(1);
|
|
|
45db86 |
+ fprintf(stderr,_("ifconfig: error resolving '%s' to set address for af=%s\n"), host, ap->name);
|
|
|
45db86 |
+
|
|
|
45db86 |
+ fprintf(stderr,_("ifconfig: `--help' gives usage information.\n")); exit(1);
|
|
|
45db86 |
}
|
|
|
45db86 |
memcpy(&ifr.ifr_addr, sa, sizeof(struct sockaddr));
|
|
|
45db86 |
{
|
|
|
45db86 |
diff --git a/ipmaddr.c.old b/ipmaddr.c
|
|
|
45db86 |
index 2bfaf98..7a313c7 100644
|
|
|
45db86 |
--- a/ipmaddr.c.old
|
|
|
45db86 |
+++ b/ipmaddr.c
|
|
|
45db86 |
@@ -336,7 +336,7 @@ int multiaddr_modify(int cmd, int argc, char **argv)
|
|
|
45db86 |
NEXT_ARG();
|
|
|
45db86 |
if (ifr.ifr_name[0])
|
|
|
45db86 |
usage();
|
|
|
45db86 |
- strncpy(ifr.ifr_name, *argv, IFNAMSIZ);
|
|
|
45db86 |
+ strncpy(ifr.ifr_name, *argv, IFNAMSIZ-1);
|
|
|
45db86 |
} else {
|
|
|
45db86 |
if (ifr.ifr_hwaddr.sa_data[0])
|
|
|
45db86 |
usage();
|
|
|
45db86 |
diff --git a/lib/inet_gr.c.old b/lib/inet_gr.c
|
|
|
45db86 |
index b172d65..75ac240 100644
|
|
|
45db86 |
--- a/lib/inet_gr.c.old
|
|
|
45db86 |
+++ b/lib/inet_gr.c
|
|
|
45db86 |
@@ -292,6 +292,7 @@ int rprint_cache(int ext, int numeric)
|
|
|
45db86 |
printf(_("Source Destination Gateway "
|
|
|
45db86 |
"Flags Metric Ref Use Iface "
|
|
|
45db86 |
"MSS Window irtt TOS HHRef HHUptod SpecDst\n"));
|
|
|
45db86 |
+
|
|
|
45db86 |
fmt = proc_gen_fmt(_PATH_PROCNET_RTCACHE, 0, fp,
|
|
|
45db86 |
"Iface", "%15s",
|
|
|
45db86 |
"Destination", "%127s",
|
|
|
45db86 |
diff --git a/lib/ipx_gr.c.old b/lib/ipx_gr.c
|
|
|
45db86 |
index 2fa717c..b98c09c 100644
|
|
|
45db86 |
--- a/lib/ipx_gr.c.old
|
|
|
45db86 |
+++ b/lib/ipx_gr.c
|
|
|
45db86 |
@@ -57,6 +57,7 @@ int IPX_rprint(int options)
|
|
|
45db86 |
|
|
|
45db86 |
if ((ap = get_afntype(AF_IPX)) == NULL) {
|
|
|
45db86 |
EINTERN("lib/ipx_rt.c", "AF_IPX missing");
|
|
|
45db86 |
+ fclose(fp);
|
|
|
45db86 |
return (-1);
|
|
|
45db86 |
}
|
|
|
45db86 |
|
|
|
45db86 |
diff --git a/lib/netrom_gr.c.old b/lib/netrom_gr.c
|
|
|
45db86 |
index ec82fe8..7c3349f 100644
|
|
|
45db86 |
--- a/lib/netrom_gr.c.old
|
|
|
45db86 |
+++ b/lib/netrom_gr.c
|
|
|
45db86 |
@@ -43,8 +43,14 @@ int NETROM_rprint(int options)
|
|
|
45db86 |
if (!f2) perror(_PATH_PROCNET_NR_NEIGH);
|
|
|
45db86 |
|
|
|
45db86 |
if (f1 == NULL || f2 == NULL) {
|
|
|
45db86 |
- printf(_("NET/ROM not configured in this system.\n"));
|
|
|
45db86 |
- return 1;
|
|
|
45db86 |
+ printf(_("NET/ROM not configured in this system.\n"));
|
|
|
45db86 |
+ if(f1 != NULL)
|
|
|
45db86 |
+ fclose(f1);
|
|
|
45db86 |
+
|
|
|
45db86 |
+ if(f2 != NULL)
|
|
|
45db86 |
+ fclose(f2);
|
|
|
45db86 |
+
|
|
|
45db86 |
+ return 1;
|
|
|
45db86 |
}
|
|
|
45db86 |
printf(_("Kernel NET/ROM routing table\n"));
|
|
|
45db86 |
printf(_("Destination Mnemonic Quality Neighbour Iface\n"));
|
|
|
45db86 |
diff --git a/statistics.c.old b/statistics.c
|
|
|
45db86 |
index 02791ed..8c2e18e 100644
|
|
|
45db86 |
--- a/statistics.c.old
|
|
|
45db86 |
+++ b/statistics.c
|
|
|
45db86 |
@@ -568,10 +568,10 @@ int parsesnmp(int flag_raw, int flag_tcp, int flag_udp, int flag_sctp)
|
|
|
45db86 |
f = proc_fopen("/proc/net/sctp/snmp");
|
|
|
45db86 |
if (f) {
|
|
|
45db86 |
process_fd2(f,"/proc/net/sctp/snmp");
|
|
|
45db86 |
- if (ferror(f)) {
|
|
|
45db86 |
+ if (ferror(f))
|
|
|
45db86 |
perror("/proc/net/sctp/snmp");
|
|
|
45db86 |
- fclose(f);
|
|
|
45db86 |
- }
|
|
|
45db86 |
+
|
|
|
45db86 |
+ fclose(f);
|
|
|
45db86 |
}
|
|
|
45db86 |
return(0);
|
|
|
45db86 |
}
|