/* 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)
key.dsize = strlen(blinks_id);
tdb_delete(pppdb, key);
unlock_db();
-
-new_phase(PHASE_DEAD);
+
+ new_phase(PHASE_DEAD);
+
+ doing_multilink = 0;
+ multilink_master = 0;
}
static void make_bundle_links(int append)
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);
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) {
ep->length = l;
return 1;
}
-