Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running under Raspbian results in "netlink receive: operation not supported" #129

Open
Trigus42 opened this issue Apr 10, 2024 · 3 comments

Comments

@Trigus42
Copy link

Trying to run this on a RaspberryPi 4, I get the following error:

root@raspberrypi:~/OpenGFW# ./OpenGFW -l debug -c config.yaml rules.yaml
2024-04-10T20:14:05+02:00       INFO    engine started
2024-04-10T20:14:05+02:00       DEBUG   worker started  {"id": 1}
2024-04-10T20:14:05+02:00       DEBUG   worker started  {"id": 0}
2024-04-10T20:14:05+02:00       DEBUG   worker started  {"id": 2}
2024-04-10T20:14:05+02:00       DEBUG   worker started  {"id": 3}
2024-04-10T20:14:05+02:00       INFO    engine exited   {"error": "netlink receive: operation not supported"}
root@raspberrypi:~/OpenGFW# uname -a
Linux raspberrypi 6.6.25-v8+ #1753 SMP PREEMPT Wed Apr 10 17:38:05 BST 2024 aarch64 GNU/Linux

I'd guess this is some problem with the kernel. If that's the case, could you give me some hints as to which kernel options I need to enable or packages I have to install? If not, do you have an idea what could be the problem here?

@haruue
Copy link
Collaborator

haruue commented Apr 11, 2024

This error is caused by the missing of nfnetlink_queue kernel module.

I have no experience with Raspbian, and I don't have a RaspberryPi. You may be able to find a third-party kernel with this kernel module, or try apt search to see if there are any additional kernel modules available.

If you'd like to build the kernel yourself, make sure you have following kernel config enabled.

# NFQUEUE
CONFIG_NETFILTER_NETLINK_QUEUE=m
CONFIG_NFT_QUEUE=m
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m

# Conntrack
CONFIG_NF_CONNTRACK=m
CONFIG_NFT_CT=m

# MARK
CONFIG_NETFILTER_XT_MARK=m
CONFIG_NETFILTER_XT_MATCH_MARK=m

# CONNMARK
CONFIG_NETFILTER_XT_CONNMARK=m
CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m

@Trigus42
Copy link
Author

Unfortunately that doesn't seem to be the issue:

root@raspberrypi:~/OpenGFW# lsmod | grep nfnetlink_queue
nfnetlink_queue        24576  0
nfnetlink              20480  5 nfnetlink_queue,nft_compat,nf_conntrack_netlink,nf_tables
root@raspberrypi:~/OpenGFW# ./OpenGFW -l debug -c config.yaml rules.yaml
2024-04-11T20:01:49+02:00       INFO    engine started
2024-04-11T20:01:49+02:00       DEBUG   worker started  {"id": 0}
2024-04-11T20:01:49+02:00       DEBUG   worker started  {"id": 2}
2024-04-11T20:01:49+02:00       DEBUG   worker started  {"id": 1}
2024-04-11T20:01:49+02:00       DEBUG   worker started  {"id": 3}
2024-04-11T20:01:49+02:00       DEBUG   worker stopped  {"id": 1}
2024-04-11T20:01:49+02:00       DEBUG   worker stopped  {"id": 0}
2024-04-11T20:01:49+02:00       INFO    engine exited   {"error": "netlink receive: operation not supported"}
2024-04-11T20:01:49+02:00       DEBUG   worker stopped  {"id": 3}
2024-04-11T20:01:49+02:00       DEBUG   worker stopped  {"id": 2}

@MengXin001
Copy link

I checked the .config of linux-headers-6.6.31+rpt-rpi-v8, the kernel config metioned above are all enabled.
possibly something else is causing it?

root@raspberrypi:~/OpenGFW $ zcat /proc/config.gz |grep NETLINK
CONFIG_COMPAT_NETLINK_MESSAGES=y
CONFIG_NETFILTER_NETLINK=m
# CONFIG_NETFILTER_NETLINK_HOOK is not set
CONFIG_NETFILTER_NETLINK_ACCT=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
CONFIG_NETFILTER_NETLINK_LOG=m
CONFIG_NETFILTER_NETLINK_OSF=m
CONFIG_NF_CT_NETLINK=m
# CONFIG_NETFILTER_NETLINK_GLUE_CT is not set
# CONFIG_NETLINK_DIAG is not set
CONFIG_ETHTOOL_NETLINK=y
CONFIG_CAN_NETLINK=y
# CONFIG_THERMAL_NETLINK is not set
# CONFIG_QUOTA_NETLINK_INTERFACE is not set
root@raspberrypi:~/OpenGFW $ zcat /proc/config.gz |grep CONNTRACK
CONFIG_NF_CONNTRACK=m
CONFIG_NF_CONNTRACK_MARK=y
CONFIG_NF_CONNTRACK_ZONES=y
# CONFIG_NF_CONNTRACK_PROCFS is not set
CONFIG_NF_CONNTRACK_EVENTS=y
# CONFIG_NF_CONNTRACK_TIMEOUT is not set
CONFIG_NF_CONNTRACK_TIMESTAMP=y
CONFIG_NF_CONNTRACK_LABELS=y
CONFIG_NF_CONNTRACK_OVS=y
CONFIG_NF_CONNTRACK_AMANDA=m
CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_H323=m
CONFIG_NF_CONNTRACK_IRC=m
CONFIG_NF_CONNTRACK_BROADCAST=m
CONFIG_NF_CONNTRACK_NETBIOS_NS=m
CONFIG_NF_CONNTRACK_SNMP=m
CONFIG_NF_CONNTRACK_PPTP=m
CONFIG_NF_CONNTRACK_SANE=m
CONFIG_NF_CONNTRACK_SIP=m
CONFIG_NF_CONNTRACK_TFTP=m
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
# CONFIG_NF_CONNTRACK_BRIDGE is not set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants