Setting ipnext and tidnext to NULL in settid and setip
CVS :cit ----------------------------------------------------------------------
This commit is contained in:
parent
824cad65bb
commit
b88f61601d
|
@ -180,6 +180,7 @@ int pdp_tidset(struct pdp_t *pdp, uint64_t tid) {
|
||||||
struct pdp_t *pdp2;
|
struct pdp_t *pdp2;
|
||||||
struct pdp_t *pdp_prev = NULL;
|
struct pdp_t *pdp_prev = NULL;
|
||||||
if (PDP_DEBUG) printf("Begin pdp_tidset tid = %llx\n", tid);
|
if (PDP_DEBUG) printf("Begin pdp_tidset tid = %llx\n", tid);
|
||||||
|
pdp->tidnext = NULL;
|
||||||
pdp->tid = tid;
|
pdp->tid = tid;
|
||||||
for (pdp2 = hashtid[hash]; pdp2; pdp2 = pdp2->tidnext)
|
for (pdp2 = hashtid[hash]; pdp2; pdp2 = pdp2->tidnext)
|
||||||
pdp_prev = pdp2;
|
pdp_prev = pdp2;
|
||||||
|
@ -202,12 +203,12 @@ int pdp_tiddel(struct pdp_t *pdp) {
|
||||||
hashtid[hash] = pdp2->tidnext;
|
hashtid[hash] = pdp2->tidnext;
|
||||||
else
|
else
|
||||||
pdp_prev->tidnext = pdp2->tidnext;
|
pdp_prev->tidnext = pdp2->tidnext;
|
||||||
if (PDP_DEBUG) printf("End pdp_tidset: PDP found\n");
|
if (PDP_DEBUG) printf("End pdp_tiddel: PDP found\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
pdp_prev = pdp2;
|
pdp_prev = pdp2;
|
||||||
}
|
}
|
||||||
if (PDP_DEBUG) printf("End pdp_tidset: PDP not found\n");
|
if (PDP_DEBUG) printf("End pdp_tiddel: PDP not found\n");
|
||||||
return EOF; /* End of linked list and not found */
|
return EOF; /* End of linked list and not found */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,6 +242,7 @@ int pdp_ipset(struct pdp_t *pdp, void* ipif, struct ul66_t *eua) {
|
||||||
eua->v[2], eua->v[3],
|
eua->v[2], eua->v[3],
|
||||||
eua->v[4], eua->v[5]);
|
eua->v[4], eua->v[5]);
|
||||||
|
|
||||||
|
pdp->ipnext = NULL;
|
||||||
pdp->ipif = ipif;
|
pdp->ipif = ipif;
|
||||||
pdp->eua.l = eua->l;
|
pdp->eua.l = eua->l;
|
||||||
memcpy(pdp->eua.v, eua->v, eua->l);
|
memcpy(pdp->eua.v, eua->v, eua->l);
|
||||||
|
|
Loading…
Reference in New Issue