mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 10:35:53 +02:00
xdp-tools: xdpsni/xdpdns init bpf path argument
now x86 and loongarch64 share same user space xdp_sni xdp_dns program with path argument to bpf map, change xdpsni and xdpdns init script with bpf path argument. Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
@@ -39,7 +39,7 @@ load_dnsblock () {
|
||||
chown -R nobody /sys/fs/bpf/xdp-dns-denylist
|
||||
# add domain to domain_denylist map
|
||||
while IFS= read -r line; do
|
||||
xdp_dns add $line
|
||||
xdp_dns /sys/fs/bpf/xdp-dns-denylist/domain_denylist add $line
|
||||
done < $domainfile
|
||||
|
||||
fi
|
||||
@@ -70,7 +70,7 @@ case "$1" in
|
||||
boot_mesg -n "Starting xdp-dns-denylist..."
|
||||
if [ "$ENABLE_DNSBLOCK" == "on" ]; then
|
||||
load_dnsblock
|
||||
loadproc -b xdp_dns_log
|
||||
loadproc -b xdp_dns_log /sys/fs/bpf/xdp-dns-denylist/dns_ringbuf
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ load_sniblock () {
|
||||
chown -R nobody /sys/fs/bpf/xdp-sni
|
||||
# add domain to domain_denylist map
|
||||
while IFS= read -r line; do
|
||||
xdp_sni add $line
|
||||
xdp_sni /sys/fs/bpf/xdp-sni/sni_denylist add $line
|
||||
done < $domainfile
|
||||
|
||||
fi
|
||||
@@ -70,7 +70,7 @@ case "$1" in
|
||||
boot_mesg -n "Starting xdp-sni..."
|
||||
if [ "$ENABLE_SNIBLOCK" == "on" ]; then
|
||||
load_sniblock
|
||||
loadproc -b xdp_sni_log
|
||||
loadproc -b xdp_sni_log /sys/fs/bpf/xdp-sni/sni_ringbuf
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user