aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/iproute2/patches/170-ip_tiny.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/utils/iproute2/patches/170-ip_tiny.patch')
-rw-r--r--package/network/utils/iproute2/patches/170-ip_tiny.patch37
1 files changed, 21 insertions, 16 deletions
diff --git a/package/network/utils/iproute2/patches/170-ip_tiny.patch b/package/network/utils/iproute2/patches/170-ip_tiny.patch
index fb5a6466e4..7129d4f19e 100644
--- a/package/network/utils/iproute2/patches/170-ip_tiny.patch
+++ b/package/network/utils/iproute2/patches/170-ip_tiny.patch
@@ -1,6 +1,6 @@
--- a/ip/Makefile
+++ b/ip/Makefile
-@@ -16,6 +16,13 @@ RTMONOBJ=rtmon.o
+@@ -17,6 +17,13 @@ RTMONOBJ=rtmon.o
include ../config.mk
@@ -14,7 +14,7 @@
ALLOBJ=$(IPOBJ) $(RTMONOBJ)
SCRIPTS=ifcfg rtpr routel routef
TARGETS=ip rtmon
-@@ -45,7 +52,7 @@ else
+@@ -46,7 +53,7 @@ else
ip: static-syms.o
static-syms.o: static-syms.h
@@ -25,24 +25,24 @@
sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
--- a/ip/ip.c
+++ b/ip/ip.c
-@@ -47,10 +47,16 @@ static void usage(void)
+@@ -48,10 +48,16 @@ static void usage(void)
fprintf(stderr,
- "Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
- " ip [ -force ] -batch filename\n"
+ "Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
+ " ip [ -force ] -batch filename\n"
+#ifndef IPROUTE2_TINY
- "where OBJECT := { link | address | addrlabel | route | rule | neigh | ntable |\n"
- " tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm |\n"
- " netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila |\n"
- " vrf | sr }\n"
+ "where OBJECT := { link | address | addrlabel | route | rule | neigh | ntable |\n"
+ " tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm |\n"
+ " netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila |\n"
+ " vrf | sr | nexthop }\n"
+#else
-+"where OBJECT := { link | address | route | rule | neigh | tunnel | maddress |\n"
-+" mroute | mrule | monitor | netns | macsec | token | ila |\n"
-+" vrf | sr }\n"
++ "where OBJECT := { link | address | route | rule | neigh | tunnel | maddress |\n"
++ " mroute | mrule | monitor | netns | macsec | token | ila |\n"
++ " vrf | sr }\n"
+#endif
- " OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
- " -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
- " -f[amily] { inet | inet6 | mpls | bridge | link } |\n"
-@@ -72,32 +78,44 @@ static const struct cmd {
+ " OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
+ " -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
+ " -f[amily] { inet | inet6 | mpls | bridge | link } |\n"
+@@ -74,35 +80,49 @@ static const struct cmd {
int (*func)(int argc, char **argv);
} cmds[] = {
{ "address", do_ipaddr },
@@ -86,7 +86,12 @@
+#endif
{ "vrf", do_ipvrf},
{ "sr", do_seg6 },
++#ifndef IPROUTE2_TINY
+ { "nexthop", do_ipnh },
++#endif
{ "help", do_help },
+ { 0 }
+ };
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -3,6 +3,10 @@ include ../config.mk