diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-04-10 20:02:03 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-04-10 20:02:03 +0200 |
commit | 829a451c2b866d502306bd0b8cbb1991a55faa45 (patch) | |
tree | 5b465d69e70218b1b0376b4c1b80c6d6f888cd5c /sys/src/9/ip/devip.c | |
parent | 0272fa04fd5da396d5f2b29d8c6c988822d2147b (diff) |
devip: properly initialize the connection ignoreadvice and tos flags
Diffstat (limited to 'sys/src/9/ip/devip.c')
-rw-r--r-- | sys/src/9/ip/devip.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/src/9/ip/devip.c b/sys/src/9/ip/devip.c index 6a08a0491..447c1ce68 100644 --- a/sys/src/9/ip/devip.c +++ b/sys/src/9/ip/devip.c @@ -549,7 +549,7 @@ closeconv(Conv *cv) } /* close all incoming calls since no listen will ever happen */ - for(nc = cv->incall; nc; nc = cv->incall){ + for(nc = cv->incall; nc != nil; nc = cv->incall){ cv->incall = nc->next; closeconv(nc); } @@ -561,9 +561,9 @@ closeconv(Conv *cv) while((mp = cv->multi) != nil) ipifcremmulti(cv, mp->ma, mp->ia); - cv->r = nil; - cv->rgen = 0; - cv->p->close(cv); + if(cv->p->close != nil) + (*cv->p->close)(cv); + cv->state = Idle; qunlock(cv); } @@ -1318,7 +1318,9 @@ retry: c->lport = 0; c->rport = 0; c->restricted = 0; + c->ignoreadvice = 0; c->ttl = MAXTTL; + c->tos = 0; qreopen(c->rq); qreopen(c->wq); qreopen(c->eq); |