Explorar o código

Fix socket_filter section match

`BPF_PROG_TYPE_SOCKET_FILTER` program expands the sectionname's kind with `socket` not `socket_filter`.
So current eBPF program with socket filter always fails.

This patch fixes it.

Fix https://github.com/aya-rs/aya/issues/227
Kenjiro Nakayama %!s(int64=3) %!d(string=hai) anos
pai
achega
9e41317
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      aya/src/obj/mod.rs

+ 1 - 1
aya/src/obj/mod.rs

@@ -184,7 +184,7 @@ impl FromStr for ProgramSection {
                 let name = section.splitn(2, '/').last().unwrap().to_owned();
                 TracePoint { name }
             }
-            "socket_filter" => SocketFilter { name },
+            "socket" => SocketFilter { name },
             "sk_msg" => SkMsg { name },
             "sk_skb" => match &*name {
                 "stream_parser" => SkSkbStreamParser { name },