It seems to me that this call to getifaddrs() is actually not needed.
ok?
diff --git usr.sbin/npppd/pppoe/pppoed.c usr.sbin/npppd/pppoe/pppoed.c
index 5b3f09dccb1..bae41732199 100644
--- usr.sbin/npppd/pppoe/pppoed.c
+++ usr.sbin/npppd/pppoe/pppoed.c
@@ -458,7 +459,6 @@ pppoed_reload(pppoed *_this, struct pppoe_confs *pppoe_conf)
{
int i, count, do_start, found;
struct pppoe_conf *conf;
- struct ifaddrs *ifa0;
slist rmlist, newlist;
struct {
char ifname[IF_NAMESIZE];
@@ -470,15 +470,9 @@ pppoed_reload(pppoed *_this, struct pppoe_confs
*pppoe_conf)
hash_link *hl;
do_start = 0;
- ifa0 = NULL;
slist_init(&rmlist);
slist_init(&newlist);
- if (getifaddrs(&ifa0) != 0) {
- pppoed_log(_this, LOG_ERR,
- "getifaddrs() failed on %s(): %m", __func__);
- goto fail;
- }
count = 0;
TAILQ_FOREACH(conf, pppoe_conf, entry) {
strlcpy(listeners[count].ifname, conf->if_name,
@@ -563,8 +557,6 @@ pppoed_reload(pppoed *_this, struct pppoe_confs *pppoe_conf)
slist_fini(&rmlist);
slist_fini(&newlist);
- if (ifa0 != NULL)
- freeifaddrs(ifa0);
if (pppoed_start(_this) != 0)
return 1;
@@ -573,8 +565,6 @@ pppoed_reload(pppoed *_this, struct pppoe_confs *pppoe_conf)
fail:
slist_fini(&rmlist);
slist_fini(&newlist);
- if (ifa0 != NULL)
- freeifaddrs(ifa0);
return 1;
}