xdp-tools: add xdp-tools

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
Vincent Li
2024-12-21 19:26:57 -08:00
parent d88bdd74b3
commit cfefb2a884
5 changed files with 132 additions and 1 deletions

View File

@@ -0,0 +1,47 @@
usr/lib/bpf/xdp-dispatcher.o
usr/lib/bpf/xdp_synproxy.bpf.o
#etc/rc.d/rc3.d/S105ddos
usr/lib/bpf/xdp_dnsrrl.bpf.o
usr/lib/bpf/xdp_udp.bpf.o
usr/lib/bpf/xdp_dns.bpf.o
usr/lib/bpf/xdp_sni.bpf.o
usr/lib/bpf/xdp_geoip.bpf.o
usr/lib/bpf/xdp_udpddos.bpf.o
usr/sbin/xdp-udp
usr/sbin/xdp_dns
#etc/rc.d/rc3.d/S102xdpdns
usr/sbin/xdp_dns_log
usr/sbin/xdp_sni
usr/sbin/xdp_sni_log
#etc/rc.d/rc3.d/S103xdpsni
usr/sbin/xdp_geoip
#etc/rc.d/rc3.d/S104xdpgeoip
usr/lib/bpf/xdpdump_bpf.o
usr/lib/bpf/xdpdump_xdp.o
usr/lib/bpf/xdpfilt_alw_all.o
usr/lib/bpf/xdpfilt_alw_eth.o
usr/lib/bpf/xdpfilt_alw_ip.o
usr/lib/bpf/xdpfilt_alw_tcp.o
usr/lib/bpf/xdpfilt_alw_udp.o
usr/lib/bpf/xdpfilt_dny_all.o
usr/lib/bpf/xdpfilt_dny_eth.o
usr/lib/bpf/xdpfilt_dny_ip.o
usr/lib/bpf/xdpfilt_dny_tcp.o
usr/lib/bpf/xdpfilt_dny_udp.o
usr/lib/bpf/xsk_def_xdp_prog.o
usr/lib/bpf/xsk_def_xdp_prog_5.3.o
usr/lib/libxdp.a
usr/lib/libxdp.so
usr/lib/libxdp.so.1
usr/lib/libxdp.so.1.4.0
usr/lib/pkgconfig/libxdp.pc
usr/sbin/xdp-bench
usr/sbin/xdp-filter
usr/sbin/xdp-loader
usr/sbin/xdp-monitor
usr/sbin/xdp-trafficgen
usr/sbin/xdp_synproxy
usr/sbin/xdp-udp
usr/sbin/xdpdump
usr/share/xdp-tools/xdp_drop.o
usr/share/xdp-tools/xdp_pass.o

View File

@@ -1,2 +1,2 @@
lib/modules/6.12.5-ipfire/extra/yt6801
lib/modules/6.12.5-ipfire/extra/yt6801/yt6801.ko.xz
lib/modules/6.12.5-ipfire/extra/yt6801/yt6801.ko

View File

@@ -181,6 +181,10 @@ $(TARGET) :
ln -sf ../init.d/firstsetup /etc/rc.d/rcsysinit.d/S75firstsetup
ln -sf ../init.d/localnet /etc/rc.d/rcsysinit.d/S80localnet
ln -sf ../init.d/firewall /etc/rc.d/rcsysinit.d/S85firewall
#ln -sf ../init.d/xdpdns /etc/rc.d/rc3.d/S102xdpdns
#ln -sf ../init.d/xdpsni /etc/rc.d/rc3.d/S103xdpsni
#ln -sf ../init.d/xdpgeoip /etc/rc.d/rc3.d/S104xdpgeoip
#ln -sf ../init.d/ddos /etc/rc.d/rc3.d/S105ddos
ln -sf ../../../../../usr/local/bin/qosctrl \
/etc/rc.d/init.d/networking/red.up/24-RS-qos

79
lfs/xdp-tools Normal file
View File

@@ -0,0 +1,79 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2023 IPFire Team <info@ipfire.org> #
# Copyright (C) 2024 BPFire <vincent.mc.li@gmail.com> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 1.4.3
THISAPP = xdp-tools-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_BLAKE2 = a5fe72d39ecf0a870b386898454fe438e121eb9fde7b721214b9a985ccb4a7f85d1e17eef99e8f426e5d3c0baacb9f147e37cb0eb754188aa1c94ac43aba47c9
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
b2 : $(subst %,%_BLAKE2,$(objects))
###############################################################################
# Downloading, checking, b2sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_BLAKE2,$(objects)) :
@$(B2SUM)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && sed -i -e 's/PREFIX?=\/usr\/local/PREFIX?=\/usr/' lib/defines.mk
cd $(DIR_APP) && ./configure
cd $(DIR_APP) && make && make install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -2091,6 +2091,7 @@ build_system() {
lfsmake2 pahole
lfsmake2 libbpf
lfsmake2 llvm-project
lfsmake2 xdp-tools
lfsmake2 linux
lfsmake2 yt6801