X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fmultilink.c;h=3aee0bcf6876686e73599835c483a1d585824cba;hb=3a7593be1582b204214f1ff9bbce849e22a81876;hp=c49c4465ced8f1b65d3be54c35b71c000c0ac33b;hpb=fcb076c2b24bd8dd73f4be7a9e1712d3a352a376;p=ppp.git diff --git a/pppd/multilink.c b/pppd/multilink.c index c49c446..3aee0bc 100644 --- a/pppd/multilink.c +++ b/pppd/multilink.c @@ -204,7 +204,7 @@ mp_join_bundle() /* make sure the string is null-terminated */ rec.dptr[rec.dsize-1] = 0; /* parse the interface number */ - parse_num(rec.dptr, "IFNAME=ppp", &unit); + parse_num(rec.dptr, "UNIT=", &unit); /* check the pid value */ if (!parse_num(rec.dptr, "PPPD_PID=", &pppd_pid) || !process_exists(pppd_pid) @@ -420,7 +420,7 @@ owns_unit(key, unit) TDB_DATA kd, vd; int ret = 0; - slprintf(ifkey, sizeof(ifkey), "IFNAME=ppp%d", unit); + slprintf(ifkey, sizeof(ifkey), "UNIT=%d", unit); kd.dptr = ifkey; kd.dsize = strlen(ifkey); vd = tdb_fetch(pppdb, kd); @@ -445,13 +445,9 @@ get_default_epdisc(ep) if (p != 0 && get_if_hwaddr(ep->value, p) >= 0) { ep->class = EPD_MAC; ep->length = 6; - free(p); return 1; } - if (p) - free(p); - /* see if our hostname corresponds to a reasonable IP address */ hp = gethostbyname(hostname); if (hp != NULL) { @@ -593,4 +589,3 @@ str_to_epdisc(ep, str) ep->length = l; return 1; } -