diff options
author | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2021-06-12 08:05:01 +0530 |
---|---|---|
committer | Andrii Nakryiko <andrii.nakryiko@gmail.com> | 2021-06-18 13:05:10 -0700 |
commit | a1bd8104a9f1c1a5b9cd0f698c886296749a0ce9 (patch) | |
tree | fb1ab3ecd2d3a930e9248d60d2e440c9fdd64f39 /src/netlink.c | |
parent | ccead28901305d79ae76c0ed3120808348956742 (diff) | |
download | libbpf-a1bd8104a9f1c1a5b9cd0f698c886296749a0ce9.tar.gz |
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 <memxor@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210612023502.1283837-3-memxor@gmail.com
Diffstat (limited to 'src/netlink.c')
-rw-r--r-- | src/netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netlink.c b/src/netlink.c index efbb50a..cf9381f 100644 --- a/src/netlink.c +++ b/src/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) |