X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fipv6cp.c;h=431cb62211bff1d28de4ca8151c070199a615877;hb=14c1a77816e837852138e87a4adccfd66030b2c3;hp=dbdc5ef8b38c21b217a9bd769ad49b9c540f87e1;hpb=0f9bd9807d92d624782fa3bc3d2abfb305edf7ee;p=ppp.git diff --git a/pppd/ipv6cp.c b/pppd/ipv6cp.c index dbdc5ef..431cb62 100644 --- a/pppd/ipv6cp.c +++ b/pppd/ipv6cp.c @@ -1058,7 +1058,8 @@ endswitch: /* * ether_to_eui64 - Convert 48-bit Ethernet address into 64-bit EUI * - * walks the list of valid ethernet interfaces, and convert the first + * walks the list of valid ethernet interfaces, starting with devnam + * (for PPPoE it is ethernet interface), and convert the first * found 48-bit MAC address into EUI 64. caller also assumes that * the system has a properly configured Ethernet interface for this * function to return non-zero. @@ -1067,15 +1068,9 @@ static int ether_to_eui64(eui64_t *p_eui64) { u_char addr[6]; - char *if_name; - 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); + if (get_if_hwaddr(addr, devnam) < 0 || get_first_ether_hwaddr(addr) < 0) { + error("ipv6cp: no persistent id can be found"); return 0; }