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:
Vincent Li
2025-01-12 03:42:49 +00:00
parent 17d49c9d64
commit bad31e01b9
2 changed files with 4 additions and 4 deletions

View File

@@ -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
;;

View File

@@ -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
;;