Skip to content

Commit bbf29d3

Browse files
kkdwvdborkmann
authored andcommitted
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: 715c5ce ("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
1 parent 4e164f8 commit bbf29d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/lib/bpf/netlink.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ static int tc_qdisc_modify(struct bpf_tc_hook *hook, int cmd, int flags)
457457

458458
static int tc_qdisc_create_excl(struct bpf_tc_hook *hook)
459459
{
460-
return tc_qdisc_modify(hook, RTM_NEWQDISC, NLM_F_CREATE);
460+
return tc_qdisc_modify(hook, RTM_NEWQDISC, NLM_F_CREATE | NLM_F_EXCL);
461461
}
462462

463463
static int tc_qdisc_delete(struct bpf_tc_hook *hook)

0 commit comments

Comments
 (0)