From 2e0804eb7a103f36e4a3611af79e694303e9590f Mon Sep 17 00:00:00 2001 From: Francis Laniel Date: Fri, 18 Feb 2022 17:43:23 +0100 Subject: [PATCH] libbpf-tools: Use __u16 for bindsnoop protocol. The kernel uses u16 for sk_protocol [1] and multipath TCP connection protocol has value 262 [2] Signed-off-by: Francis Laniel --- [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/net/sock.h?h=v5.16#n481 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/in.h?h=v5.16#n81 --- libbpf-tools/bindsnoop.bpf.c | 1 - libbpf-tools/bindsnoop.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/libbpf-tools/bindsnoop.bpf.c b/libbpf-tools/bindsnoop.bpf.c index bcbfc5422ced..941826c39d45 100644 --- a/libbpf-tools/bindsnoop.bpf.c +++ b/libbpf-tools/bindsnoop.bpf.c @@ -6,7 +6,6 @@ #include #include #include "bindsnoop.h" -#include "maps.bpf.h" #define MAX_ENTRIES 10240 #define MAX_PORTS 1024 diff --git a/libbpf-tools/bindsnoop.h b/libbpf-tools/bindsnoop.h index 1c881b03ec0d..fa7b19de0d49 100644 --- a/libbpf-tools/bindsnoop.h +++ b/libbpf-tools/bindsnoop.h @@ -11,8 +11,8 @@ struct bind_event { __u32 bound_dev_if; int ret; __u16 port; + __u16 proto; __u8 opts; - __u8 proto; __u8 ver; char task[TASK_COMM_LEN]; };