diff --git a/.github/workflows/advanced-lb-sanity.yml b/.github/workflows/advanced-lb-sanity.yml index 9c43134f3..0b3e82abc 100644 --- a/.github/workflows/advanced-lb-sanity.yml +++ b/.github/workflows/advanced-lb-sanity.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-10 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat ethtool - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/basic-sanity-ubuntu-22.yml b/.github/workflows/basic-sanity-ubuntu-22.yml index 34ceed77c..9f4ad7c2c 100644 --- a/.github/workflows/basic-sanity-ubuntu-22.yml +++ b/.github/workflows/basic-sanity-ubuntu-22.yml @@ -39,15 +39,6 @@ jobs: - run: | sudo ip netns add test sudo ip netns del test - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/basic-sanity.yml b/.github/workflows/basic-sanity.yml index f4afa8abf..5a9df8200 100644 --- a/.github/workflows/basic-sanity.yml +++ b/.github/workflows/basic-sanity.yml @@ -21,15 +21,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-10 llvm libelf-dev gcc-multilib libpcap-dev elfutils dwarves git linux-tools-$(uname -r) libbsd-dev bridge-utils unzip build-essential bison flex iproute2 - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/cluster-sanity.yml b/.github/workflows/cluster-sanity.yml index 89d15b885..a23ae569c 100644 --- a/.github/workflows/cluster-sanity.yml +++ b/.github/workflows/cluster-sanity.yml @@ -24,15 +24,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-10 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/ipsec-sanity-ubuntu-22.yml b/.github/workflows/ipsec-sanity-ubuntu-22.yml index 57f20a55f..f90e43043 100644 --- a/.github/workflows/ipsec-sanity-ubuntu-22.yml +++ b/.github/workflows/ipsec-sanity-ubuntu-22.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-13 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/ipsec-sanity.yml b/.github/workflows/ipsec-sanity.yml index 3c72592a9..3ac2517cf 100644 --- a/.github/workflows/ipsec-sanity.yml +++ b/.github/workflows/ipsec-sanity.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-10 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/liveness-sanity.yml b/.github/workflows/liveness-sanity.yml index ddeadc1d9..f1ebcc78b 100644 --- a/.github/workflows/liveness-sanity.yml +++ b/.github/workflows/liveness-sanity.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-10 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat ethtool - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/nat66-sanity-ubuntu-22.yml b/.github/workflows/nat66-sanity-ubuntu-22.yml index 3abcd4c99..073a8b526 100644 --- a/.github/workflows/nat66-sanity-ubuntu-22.yml +++ b/.github/workflows/nat66-sanity-ubuntu-22.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-13 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat ethtool - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/nat66-sanity.yml b/.github/workflows/nat66-sanity.yml index 4938899c4..8a4351b25 100644 --- a/.github/workflows/nat66-sanity.yml +++ b/.github/workflows/nat66-sanity.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-10 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat ethtool - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/scale-sanity-ubuntu-22.yml b/.github/workflows/scale-sanity-ubuntu-22.yml index 50eb2c072..085e5a31b 100644 --- a/.github/workflows/scale-sanity-ubuntu-22.yml +++ b/.github/workflows/scale-sanity-ubuntu-22.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-13 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat lksctp-tools - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/scale-sanity.yml b/.github/workflows/scale-sanity.yml index ca4d8807a..35fd189d8 100644 --- a/.github/workflows/scale-sanity.yml +++ b/.github/workflows/scale-sanity.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-10 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/sctp-sanity-ubuntu-22.yml b/.github/workflows/sctp-sanity-ubuntu-22.yml index e67075a3c..a5b753319 100644 --- a/.github/workflows/sctp-sanity-ubuntu-22.yml +++ b/.github/workflows/sctp-sanity-ubuntu-22.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-13 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat ethtool lksctp-tools - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/sctp-sanity.yml b/.github/workflows/sctp-sanity.yml index 7abdc3685..637b0feb9 100644 --- a/.github/workflows/sctp-sanity.yml +++ b/.github/workflows/sctp-sanity.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-10 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat ethtool - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/sctpmh-sanity.yml b/.github/workflows/sctpmh-sanity.yml index 1bfcb7a55..facc8fbb9 100644 --- a/.github/workflows/sctpmh-sanity.yml +++ b/.github/workflows/sctpmh-sanity.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-10 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat ethtool curl lksctp-tools - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/tcp-sanity-ubuntu-22.yml b/.github/workflows/tcp-sanity-ubuntu-22.yml index 0f01a8de0..ba91c8518 100644 --- a/.github/workflows/tcp-sanity-ubuntu-22.yml +++ b/.github/workflows/tcp-sanity-ubuntu-22.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-13 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat ethtool - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/tcp-sanity.yml b/.github/workflows/tcp-sanity.yml index 6610eedab..083cee68b 100644 --- a/.github/workflows/tcp-sanity.yml +++ b/.github/workflows/tcp-sanity.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-10 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat ethtool - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/udp-sanity-ubuntu-22.yml b/.github/workflows/udp-sanity-ubuntu-22.yml index 8ac6ab240..3ea2a3f8e 100644 --- a/.github/workflows/udp-sanity-ubuntu-22.yml +++ b/.github/workflows/udp-sanity-ubuntu-22.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-13 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat ethtool - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/.github/workflows/udp-sanity.yml b/.github/workflows/udp-sanity.yml index 3bcd88b2f..d46d4ab29 100644 --- a/.github/workflows/udp-sanity.yml +++ b/.github/workflows/udp-sanity.yml @@ -29,15 +29,6 @@ jobs: go-version: '>=1.18.0' - run: sudo apt-get update - run: sudo apt-get -y install clang-10 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat ethtool - - run: | - git clone --recurse-submodules https://github.com/loxilb-io/iproute2 iproute2-main - cd iproute2-main/libbpf/src/ - sudo make install - mkdir build - DESTDIR=build OBJDIR=build make install - cd - - cd iproute2-main/ - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd - - run: loxilb-ebpf/utils/mkllb_bpffs.sh - run: sudo -E env "PATH=$PATH" make - run: sudo -E env "PATH=$PATH" make test diff --git a/loxilb-ebpf b/loxilb-ebpf index db03e827b..7a56a14a9 160000 --- a/loxilb-ebpf +++ b/loxilb-ebpf @@ -1 +1 @@ -Subproject commit db03e827ba5369443fb8b70fefcf509ec431508a +Subproject commit 7a56a14a9aa26b05ed122e09ade2781ccfabc032 diff --git a/pkg/loxinet/dpebpf_linux.go b/pkg/loxinet/dpebpf_linux.go index 452d9d25b..d9726d43a 100644 --- a/pkg/loxinet/dpebpf_linux.go +++ b/pkg/loxinet/dpebpf_linux.go @@ -905,7 +905,12 @@ func DpRouteMod(w *RouteDpWorkQ) int { } } } else { - dat.ca.act_type = C.DP_SET_TOCP + mLen, _ := w.Dst.Mask.Size() + if mLen == 32 || mLen == 128 { + dat.ca.act_type = C.DP_SET_TOCP + } else { + dat.ca.act_type = C.DP_SET_NOP + } } if w.RtMark > 0 {