X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fipv6cp.c;fp=pppd%2Fipv6cp.c;h=431cb62211bff1d28de4ca8151c070199a615877;hb=952cfa5acc41ad4ceee160420a188a388bb340cf;hp=b9c96d4f0e2c2108cdb46858d1f0e0d95f01f5a6;hpb=18ad641f94c72e1dcdd8189b991c339e5bdde966;p=ppp.git diff --git a/pppd/ipv6cp.c b/pppd/ipv6cp.c index b9c96d4..431cb62 100644 --- a/pppd/ipv6cp.c +++ b/pppd/ipv6cp.c @@ -1068,18 +1068,10 @@ static int ether_to_eui64(eui64_t *p_eui64) { u_char addr[6]; - char *if_name; - - if (get_if_hwaddr(addr, devnam) < 0) { - if ((if_name = get_first_ethernet()) == NULL) { - error("no persistent id can be found"); - return 0; - } - - if (get_if_hwaddr(addr, if_name) < 0) { - error("could not obtain hardware address for %s", if_name); - return 0; - } + + if (get_if_hwaddr(addr, devnam) < 0 || get_first_ether_hwaddr(addr) < 0) { + error("ipv6cp: no persistent id can be found"); + return 0; } /*