Skip to content

Commit

Permalink
iproute2: update to 6.8.0
Browse files Browse the repository at this point in the history
Support for iptables action has been dropped. Remove tc-mod-iptables and related
patch (175-reduce-dynamic-syms.patch).

Include a patch to fix the build with GCC 14.

Fix 170-ip_tiny.patch, as the help text didn't match all the included functions.

All other patches automatically rebased.

Signed-off-by: Rui Salvaterra <[email protected]>
  • Loading branch information
rsalvaterra committed May 8, 2024
1 parent 51c70e4 commit f1ce88b
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 78 deletions.
21 changes: 3 additions & 18 deletions package/network/utils/iproute2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=iproute2
PKG_VERSION:=6.7.0
PKG_VERSION:=6.8.0
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
PKG_HASH:=ff942dd9828d7d1f867f61fe72ce433078c31e5d8e4a78e20f02cb5892e8841d
PKG_HASH:=03a6cca3d71a908d1f15f7b495be2b8fe851f941458dc4664900d7f45fcf68ce
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=iptables
PKG_LICENSE:=GPL-2.0
Expand Down Expand Up @@ -77,14 +77,7 @@ $(call Package/iproute2/Default)
VARIANT:=tcfull
PROVIDES:=tc
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
VARIANT:=tcfull
DEPENDS:=+libxtables +libbpf
DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl +libbpf +libxtables
endef

define Package/genl
Expand Down Expand Up @@ -232,11 +225,6 @@ define Package/tc-full/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-full
endef

define Package/tc-mod-iptables/install
$(INSTALL_DIR) $(1)/usr/lib/tc
$(CP) $(PKG_BUILD_DIR)/tc/m_xt.so $(1)/usr/lib/tc
endef

define Package/genl/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/
Expand Down Expand Up @@ -269,9 +257,6 @@ 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))
Expand Down
25 changes: 25 additions & 0 deletions package/network/utils/iproute2/patches/001-fix-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Index: iproute2-6.8.0/bridge/mdb.c
===================================================================
--- iproute2-6.8.0.orig/bridge/mdb.c
+++ iproute2-6.8.0/bridge/mdb.c
@@ -7,6 +7,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
+#include <limits.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
Index: iproute2-6.8.0/include/json_print.h
===================================================================
--- iproute2-6.8.0.orig/include/json_print.h
+++ iproute2-6.8.0/include/json_print.h
@@ -8,6 +8,8 @@
#ifndef _JSON_PRINT_H_
#define _JSON_PRINT_H_

+#include <sys/time.h>
+
#include "json_writer.h"
#include "color.h"

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/tc/Makefile
+++ b/tc/Makefile
@@ -119,6 +119,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR
@@ -107,6 +107,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR
ifneq ($(IPT_LIB_DIR),)
CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\"
endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -391,7 +391,7 @@ check_tirpc()
@@ -362,7 +362,7 @@ check_tirpc()

check_mnl()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -246,7 +246,7 @@ EOF
@@ -217,7 +217,7 @@ EOF

check_elf()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -449,7 +449,7 @@ EOF
@@ -421,7 +421,7 @@ EOF

check_cap()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -378,7 +378,7 @@ check_selinux()
@@ -349,7 +349,7 @@ check_selinux()

check_tirpc()
{
Expand Down
10 changes: 5 additions & 5 deletions package/network/utils/iproute2/patches/170-ip_tiny.patch
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
" ip [ -force ] -batch filename\n"
+#ifndef IPROUTE2_TINY
"where OBJECT := { address | addrlabel | amt | fou | help | ila | ioam | l2tp |\n"
" link | macsec | maddress | monitor | mptcp | mroute | mrule |\n"
"where OBJECT := { address | addrlabel | fou | help | ila | ioam | l2tp | link |\n"
" macsec | maddress | monitor | mptcp | mroute | mrule |\n"
" neighbor | neighbour | netconf | netns | nexthop | ntable |\n"
" ntbl | route | rule | sr | tap | tcpmetrics |\n"
" ntbl | route | rule | sr | stats | tap | tcpmetrics |\n"
" token | tunnel | tuntap | vrf | xfrm }\n"
+#else
+ "where OBJECT := { address | link | maddress | monitor |\n"
+ "where OBJECT := { address | help | link | maddress | monitor |\n"
+ " neighbor | neighbour | netns | route |\n"
+ " rule | token | tunnel }\n"
+ " rule | stats | token | tunnel }\n"
+#endif
" OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
" -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -270,7 +270,7 @@ int main(int argc, char **argv) {
@@ -241,7 +241,7 @@ int main(int argc, char **argv) {
}
EOF

Expand All @@ -9,7 +9,7 @@
local ret=$?

rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test
@@ -288,7 +288,7 @@ int main(int argc, char **argv) {
@@ -259,7 +259,7 @@ int main(int argc, char **argv) {
}
EOF

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

--- a/tc/Makefile
+++ b/tc/Makefile
@@ -132,7 +132,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
@@ -120,7 +120,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic $< -o $@


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -435,14 +435,8 @@ EOF
@@ -407,14 +407,8 @@ EOF
if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then
echo "no"
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configure
+++ b/configure
@@ -365,7 +365,7 @@ check_libbpf()
@@ -336,7 +336,7 @@ check_libbpf()
check_selinux()
# SELinux is a compile time option in the ss utility
{
Expand Down

0 comments on commit f1ce88b

Please sign in to comment.