Skip to content

Commit

Permalink
elf_reader: Fix cgroup/sock_{create,release} program type
Browse files Browse the repository at this point in the history
The program type for cgroup/sock_{create,release} was CGroupSKB,
when it should've been CGroupSock. The section to type array now
matches with libbpf.

Signed-off-by: Jussi Maki <jussi@isovalent.com>
  • Loading branch information
joamaki authored and ti-mo committed Feb 21, 2022
1 parent 42f2a98 commit 299accb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elf_reader.go
Expand Up @@ -1114,8 +1114,8 @@ func getProgType(sectionName string) (ProgramType, AttachType, uint32, string) {
{"cgroup_skb/ingress", CGroupSKB, AttachCGroupInetIngress, 0},
{"cgroup_skb/egress", CGroupSKB, AttachCGroupInetEgress, 0},
{"cgroup/skb", CGroupSKB, AttachNone, 0},
{"cgroup/sock_create", CGroupSKB, AttachCGroupInetSockCreate, 0},
{"cgroup/sock_release", CGroupSKB, AttachCgroupInetSockRelease, 0},
{"cgroup/sock_create", CGroupSock, AttachCGroupInetSockCreate, 0},
{"cgroup/sock_release", CGroupSock, AttachCgroupInetSockRelease, 0},
{"cgroup/sock", CGroupSock, AttachCGroupInetSockCreate, 0},
{"cgroup/post_bind4", CGroupSock, AttachCGroupInet4PostBind, 0},
{"cgroup/post_bind6", CGroupSock, AttachCGroupInet6PostBind, 0},
Expand Down

0 comments on commit 299accb

Please sign in to comment.