mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix: only reset tc if it was initialized before
This commit is contained in:
parent
3cb842b28a
commit
70d2e1a760
1 changed files with 8 additions and 1 deletions
|
@ -94,7 +94,14 @@ int if_stop(struct interface *i)
|
|||
|
||||
{ INDENT
|
||||
if_setaffinity(i, -1L);
|
||||
tc_reset(i);
|
||||
|
||||
/* Only reset tc if it was initialized before */
|
||||
FOREACH(&i->sockets, it) {
|
||||
if (it->socket->netem) {
|
||||
tc_reset(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue