Skip to content

error: ‘NFPROTO_NETDEV’ undeclared here (not in a function); did you mean ‘NFPROTO_DECNET’? #210

@InputOutputZ

Description

@InputOutputZ

Environment

  • bpftool version: 7.6.0
  • Linux kernel version: 6.9.7
  • (optionally) clang/LLVM version: 4.8.5
  • ...

Describe the bug

I tried to compile bpf tool on Linux 6.9.7 Kernel and it thows

...                        libbfd: [ OFF ]
...               clang-bpf-co-re: [ OFF ]
...                          llvm: [ OFF ]
...                        libcap: [ on  ]
  CC       link.o
link.c:660:10: error: ‘NFPROTO_NETDEV’ undeclared here (not in a function); did you mean ‘NFPROTO_DECNET’?
  660 |         [NFPROTO_NETDEV] = "netdev",
      |          ^~~~~~~~~~~~~~
      |          NFPROTO_DECNET
link.c:660:10: error: array index in initializer not of integer type
link.c:660:10: note: (near initialization for ‘pf2name’)
make: *** [Makefile:253: link.o] Error 1

I checked netfilter header file and its missing netdev enum entry yet I understood from online sources that bpftool doesn't rely on netfilter and wondered why do I get this error?

Is there any workaround to get bpf compiled? if not which linux kernels are compatible with bpftool?

Looking forward for any ideas, with thanks.

Zak.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions