From 36fee0c28d049184edca30b7c08114c278095d56 Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 6 Jun 2008 08:59:55 +0000 Subject: Don't abend if we get ENOMEM from sysctl(3). The data returned is sufficient MFC after: 2 weeks --- sbin/natd/natd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c index c0fb05f..7a8d164 100644 --- a/sbin/natd/natd.c +++ b/sbin/natd/natd.c @@ -884,7 +884,7 @@ SetAliasAddressFromIfName(const char *ifn) err(1, "iflist-sysctl-estimate"); if ((buf = malloc(needed)) == NULL) errx(1, "malloc failed"); - if (sysctl(mib, 6, buf, &needed, NULL, 0) == -1) + if (sysctl(mib, 6, buf, &needed, NULL, 0) == -1 && errno != ENOMEM) err(1, "iflist-sysctl-get"); lim = buf + needed; /* -- cgit v1.1