summaryrefslogtreecommitdiffstats
path: root/zebra/if_ioctl_solaris.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-08-28 10:59:02 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2018-09-08 21:30:42 +0200
commitae9eebcaeb68cae4f2e4ae6cc689b505c9814591 (patch)
treee5d35c2e985f90134fa3cb5a0912ebfba0a4df7b /zebra/if_ioctl_solaris.c
parent*: fix config.h/zebra.h include order (diff)
downloadfrr-ae9eebcaeb68cae4f2e4ae6cc689b505c9814591.tar.xz
frr-ae9eebcaeb68cae4f2e4ae6cc689b505c9814591.zip
*: fix some solaris warnings
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'zebra/if_ioctl_solaris.c')
-rw-r--r--zebra/if_ioctl_solaris.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/zebra/if_ioctl_solaris.c b/zebra/if_ioctl_solaris.c
index 5a58fe175..7ec73ea11 100644
--- a/zebra/if_ioctl_solaris.c
+++ b/zebra/if_ioctl_solaris.c
@@ -39,6 +39,7 @@
#include "zebra/interface.h"
#include "zebra/ioctl_solaris.h"
#include "zebra/rib.h"
+#include "zebra/rt.h"
static int if_get_addr(struct interface *, struct sockaddr *, const char *);
static void interface_info_ioctl(struct interface *);
@@ -55,7 +56,6 @@ static int interface_list_ioctl(int af)
struct lifconf lifconf;
struct interface *ifp;
int n;
- int save_errno;
size_t needed, lastneeded = 0;
char *buf = NULL;
@@ -76,13 +76,11 @@ calculate_lifc_len:
lifn.lifn_flags = LIFC_NOXMIT;
/* we want NOXMIT interfaces too */
ret = ioctl(sock, SIOCGLIFNUM, &lifn);
- save_errno = errno;
-
}
if (ret < 0) {
zlog_warn("interface_list_ioctl: SIOCGLIFNUM failed %s",
- safe_strerror(save_errno));
+ safe_strerror(errno));
close(sock);
return -1;
}