1
0
Fork 0
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:
Steffen Vogel 2015-06-10 14:54:14 +02:00
parent 3cb842b28a
commit 70d2e1a760

View file

@ -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;