aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/iproute2/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/utils/iproute2/Makefile')
-rw-r--r--package/network/utils/iproute2/Makefile62
1 files changed, 51 insertions, 11 deletions
diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile
index 54165636c7c..2f9d2f2bc98 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -8,17 +8,19 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=iproute2
-PKG_VERSION:=5.11.0
-PKG_RELEASE:=4
+PKG_VERSION:=6.7.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
-PKG_HASH:=c5e2ea108212b3445051b35953ec267f9f3469e1d5c67ac034ab559849505c54
+PKG_HASH:=ff942dd9828d7d1f867f61fe72ce433078c31e5d8e4a78e20f02cb5892e8841d
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=iptables
PKG_LICENSE:=GPL-2.0
PKG_CPE_ID:=cpe:/a:iproute2_project:iproute2
+PKG_BUILD_FLAGS:=gc-sections lto
+
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
@@ -57,7 +59,16 @@ $(call Package/iproute2/Default)
DEFAULT_VARIANT:=1
PROVIDES:=tc
ALTERNATIVES:=200:/sbin/tc:/usr/libexec/tc-tiny
- DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +(PACKAGE_devlink||PACKAGE_rdma):libmnl
+ DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl
+endef
+
+define Package/tc-bpf
+$(call Package/iproute2/Default)
+ TITLE:=Traffic control utility (bpf)
+ VARIANT:=tcbpf
+ PROVIDES:=tc
+ ALTERNATIVES:=300:/sbin/tc:/usr/libexec/tc-bpf
+ DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl +libbpf
endef
define Package/tc-full
@@ -65,14 +76,15 @@ $(call Package/iproute2/Default)
TITLE:=Traffic control utility (full)
VARIANT:=tcfull
PROVIDES:=tc
- ALTERNATIVES:=300:/sbin/tc:/usr/libexec/tc-full
- DEPENDS:=+kmod-sched-core +libxtables +tc-mod-iptables +libbpf +(PACKAGE_devlink||PACKAGE_rdma):libmnl
+ ALTERNATIVES:=400:/sbin/tc:/usr/libexec/tc-full
+ DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl +libbpf +libxtables +tc-mod-iptables
endef
define Package/tc-mod-iptables
$(call Package/iproute2/Default)
TITLE:=Traffic control module - iptables action
- DEPENDS:=+libxtables
+ VARIANT:=tcfull
+ DEPENDS:=+libxtables +libbpf
endef
define Package/genl
@@ -123,13 +135,29 @@ endif
ifeq ($(BUILD_VARIANT),tctiny)
LIBBPF_FORCE:=off
+endif
+
+ifeq ($(BUILD_VARIANT),tcbpf)
+ HAVE_ELF:=y
+ LIBBPF_FORCE:=on
SHARED_LIBS:=y
endif
ifeq ($(BUILD_VARIANT),tcfull)
+ #enable iptables/xtables requirement only if tciptables variant is selected
+ TC_CONFIG_XT:=y
+ TC_CONFIG_XT_OLD:=y
+ TC_CONFIG_XT_OLD_H:=y
+ TC_CONFIG_IPSET:=y
HAVE_ELF:=y
LIBBPF_FORCE:=on
SHARED_LIBS:=y
+else
+ #disable iptables requirement by default
+ TC_CONFIG_XT:=n
+ TC_CONFIG_XT_OLD:=n
+ TC_CONFIG_XT_OLD_H:=n
+ TC_CONFIG_IPSET:=n
endif
ifdef CONFIG_PACKAGE_devlink
@@ -145,12 +173,11 @@ define Build/Configure
> $(PKG_BUILD_DIR)/include/SNAPSHOT.h
endef
-TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
-TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed
+TARGET_LDFLAGS += -Wl,--as-needed
TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny
MAKE_FLAGS += \
- KERNEL_INCLUDE="$(LINUX_DIR)/user_headers/include" \
+ KERNEL_INCLUDE="$(LINUX_DIR)/include/uapi" \
SHARED_LIBS=$(SHARED_LIBS) \
IP_CONFIG_TINY=$(IP_CONFIG_TINY) \
BUILD_VARIANT=$(BUILD_VARIANT) \
@@ -158,8 +185,13 @@ MAKE_FLAGS += \
HAVE_ELF=$(HAVE_ELF) \
HAVE_MNL=$(HAVE_MNL) \
HAVE_CAP=$(HAVE_CAP) \
+ HAVE_TIRPC=n \
IPT_LIB_DIR=/usr/lib/iptables \
XT_LIB_DIR=/usr/lib/iptables \
+ TC_CONFIG_XT=$(TC_CONFIG_XT) \
+ TC_CONFIG_XT_OLD=$(TC_CONFIG_XT_OLD) \
+ TC_CONFIG_XT_OLD_H=$(TC_CONFIG_XT_OLD_H) \
+ TC_CONFIG_IPSET=$(TC_CONFIG_IPSET) \
FPIC="$(FPIC)" \
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='')
@@ -190,6 +222,11 @@ define Package/tc-tiny/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-tiny
endef
+define Package/tc-bpf/install
+ $(INSTALL_DIR) $(1)/usr/libexec
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-bpf
+endef
+
define Package/tc-full/install
$(INSTALL_DIR) $(1)/usr/libexec
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-full
@@ -232,9 +269,12 @@ endef
$(eval $(call BuildPackage,ip-tiny))
$(eval $(call BuildPackage,ip-full))
+# build tc-mod-iptables before its dependents, to avoid
+# spurious rebuilds when building multiple variants.
+$(eval $(call BuildPackage,tc-mod-iptables))
$(eval $(call BuildPackage,tc-tiny))
+$(eval $(call BuildPackage,tc-bpf))
$(eval $(call BuildPackage,tc-full))
-$(eval $(call BuildPackage,tc-mod-iptables))
$(eval $(call BuildPackage,genl))
$(eval $(call BuildPackage,ip-bridge))
$(eval $(call BuildPackage,ss))