diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2023-05-19 23:36:32 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2023-05-19 23:36:32 +0000 |
commit | a9cdbcd5016319901ea112096f042ac9017cdce4 (patch) | |
tree | a4efd3b15e6da83bf1b126a4f4b801fc05d37fba /sys/src/9/ip | |
parent | 9ebe38c9602310d6c8404e1d8104a744c09f0215 (diff) |
devip: rlock ifc before accessing interface parameters in ipifcstate()
Diffstat (limited to 'sys/src/9/ip')
-rw-r--r-- | sys/src/9/ip/ipifc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/ip/ipifc.c b/sys/src/9/ip/ipifc.c index 2c401bc98..b6f615084 100644 --- a/sys/src/9/ip/ipifc.c +++ b/sys/src/9/ip/ipifc.c @@ -258,6 +258,7 @@ ipifcstate(Conv *c, char *state, int n) int m; ifc = (Ipifc*)c->ptcl; + rlock(ifc); m = snprint(state, n, sfixedformat, ifc->dev, ifc->maxtu, ifc->sendra6, ifc->recvra6, ifc->rp.mflag, ifc->rp.oflag, ifc->rp.maxraint, @@ -266,7 +267,6 @@ ipifcstate(Conv *c, char *state, int n) ifc->in, ifc->out, ifc->inerr, ifc->outerr, ifc->speed, ifc->delay); - rlock(ifc); for(lifc = ifc->lifc; lifc != nil && n > m; lifc = lifc->next) m += snprint(state+m, n - m, slineformat, lifc->local, lifc->mask, lifc->remote, lifc->validlt, lifc->preflt); |