gamemann / XDP-Firewall

A firewall that utilizes the Linux kernel's XDP hook. The XDP hook allows for very fast network processing on Linux systems. This is great for dropping malicious traffic from a (D)DoS attack. IPv6 is supported with this firewall! I hope this helps network engineers/programmers interested in utilizing XDP!
https://deaconn.net/
MIT License
558 stars 92 forks source link

error when run xdpfw #52

Closed eplusvietnam closed 4 months ago

eplusvietnam commented 4 months ago

i having issue when ran "sudo xdpfw" , error : 497: (71) r1 = (u8 )(r0 +72) BPF program is too large. Processed 1000001 insn processed 1000001 insns (limit 1000000) max_states_per_insn 213 total_states 32198 peak_states 4041 mark_read 324

libbpf: -- END LOG -- libbpf: failed to load program 'xdp_prog' libbpf: failed to load object '/etc/xdpfw/xdpfw_kern.o' Could not load XDP BPF program :: Argument list too long. Error loading eBPF object file. File name => /etc/xdpfw/xdpfw_kern.o.

and i using debian 6.1.0-22-amd64 . i tried "make" again, but still error. help me , thank so much !

gamemann commented 4 months ago

Hey!

Can you try decreasing the MAX_FILTERS constant here from 80 to something like 40, recompile, and try again?

eplusvietnam commented 4 months ago

thank so much. resolved

gamemann commented 4 months ago

No problem and I'm glad that resolved the issue! I will be closing this issue for now.