You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(netfault): replace root qdisc instead of add to support pre-existing qdiscs
Network attacks using tc (delay, loss, corruption, bandwidth) failed on
hosts where the kernel had already attached a root qdisc to the target
interface (e.g. `mq` on GKE COS, EKS, AKS). `tc qdisc add ... root`
returned `NLM_F_REPLACE needed to override` and the attack could not
start.
Switch the root qdisc command to `tc qdisc replace ... root` on apply.
On revert we still `qdisc del root`; the kernel then re-attaches its
default qdisc (`mq` on multi-queue devices, `noqueue` on veth, otherwise
the configured `net.core.default_qdisc`), so common cloud node setups
are restored to their pre-attack state.
Add a preflight inspection that runs `tc qdisc show` on each affected
interface and emits a warning if the root qdisc is not one the kernel
auto-restores (anything other than mq, noqueue, pfifo_fast, fq_codel,
fq). Callers receive the warnings via the new `Apply` return value.
Breaking change: `netfault.Apply` now returns `([]string, error)`.
0 commit comments