diff options
| author | Kumar Kartikeya Dwivedi <[email protected]> | 2021-06-12 02:35:01 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2021-06-15 12:00:30 +0000 |
| commit | bbf29d3a2e49e482d5267311798aec42f00e88f3 (patch) | |
| tree | b6957bf4b95e51a4272f83ce8987323dfb5cad49 /tools/lib/bpf/netlink.c | |
| parent | libbpf: Remove unneeded check for flags during tc detach (diff) | |
| download | kernel-bbf29d3a2e49e482d5267311798aec42f00e88f3.tar.gz kernel-bbf29d3a2e49e482d5267311798aec42f00e88f3.zip | |
libbpf: Set NLM_F_EXCL when creating qdisc
This got lost during the refactoring across versions. We always use
NLM_F_EXCL when creating some TC object, so reflect what the function
says and set the flag.
Fixes: 715c5ce454a6 ("libbpf: Add low level TC-BPF management API")
Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/netlink.c')
| -rw-r--r-- | tools/lib/bpf/netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/netlink.c b/tools/lib/bpf/netlink.c index efbb50ad59d8..cf9381f03b16 100644 --- a/tools/lib/bpf/netlink.c +++ b/tools/lib/bpf/netlink.c @@ -457,7 +457,7 @@ static int tc_qdisc_modify(struct bpf_tc_hook *hook, int cmd, int flags) static int tc_qdisc_create_excl(struct bpf_tc_hook *hook) { - return tc_qdisc_modify(hook, RTM_NEWQDISC, NLM_F_CREATE); + return tc_qdisc_modify(hook, RTM_NEWQDISC, NLM_F_CREATE | NLM_F_EXCL); } static int tc_qdisc_delete(struct bpf_tc_hook *hook) |
