--- a/ip/Makefile
+++ b/ip/Makefile
-@@ -16,6 +16,13 @@ ifeq ($(IP_CONFIG_SETNS),y)
- CFLAGS += -DHAVE_SETNS
+@@ -28,6 +28,13 @@ ifeq ($(HAVE_MNL),y)
+ LDLIBS += $(shell $(PKG_CONFIG) libmnl --libs)
endif
+STATIC_SYM_FILTER:=
ALLOBJ=$(IPOBJ) $(RTMONOBJ)
SCRIPTS=ifcfg rtpr routel routef
TARGETS=ip rtmon
-@@ -43,7 +50,7 @@ else
+@@ -57,7 +64,7 @@ else
ip: static-syms.o
static-syms.o: static-syms.h
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
-@@ -71,30 +71,42 @@ static const struct cmd {
+@@ -74,32 +74,44 @@ static const struct cmd {
int (*func)(int argc, char **argv);
} cmds[] = {
{ "address", do_ipaddr },
{ "link", do_iplink },
+#ifndef IPROUTE2_TINY
{ "l2tp", do_ipl2tp },
- { "fou", do_ipfou },
+ { "fou", do_ipfou },
+#endif
+ { "ila", do_ipila },
+ { "macsec", do_ipmacsec },
{ "tunnel", do_iptunnel },
{ "tunl", do_iptunnel },
+#ifndef IPROUTE2_TINY
{ "tap", do_iptuntap },
{ "token", do_iptoken },
{ "tcpmetrics", do_tcp_metrics },
- { "tcp_metrics",do_tcp_metrics },
+ { "tcp_metrics", do_tcp_metrics },
+#endif
{ "monitor", do_ipmonitor },
+#ifndef IPROUTE2_TINY
+#ifndef IPROUTE2_TINY
{ "netconf", do_ipnetconf },
+#endif
+ { "vrf", do_ipvrf},
+ { "sr", do_seg6 },
{ "help", do_help },
- { 0 }
- };
--- a/lib/utils.c
+++ b/lib/utils.c
-@@ -630,6 +630,7 @@ const char *rt_addr_n2a(int af, const vo
- case AF_INET:
- case AF_INET6:
+@@ -787,6 +787,7 @@ const char *rt_addr_n2a_r(int af, int le
return inet_ntop(af, addr, buf, buflen);
+ case AF_MPLS:
+ return mpls_ntop(af, addr, buf, buflen);
+#ifndef IPROUTE2_TINY
case AF_IPX:
return ipx_ntop(af, addr, buf, buflen);
case AF_DECnet:
-@@ -638,6 +639,7 @@ const char *rt_addr_n2a(int af, const vo
+@@ -796,6 +797,7 @@ const char *rt_addr_n2a_r(int af, int le
memcpy(dna.a_addr, addr, 2);
return dnet_ntop(af, &dna, buf, buflen);
}
+#endif
+ case AF_PACKET:
+ return ll_addr_n2a(addr, len, ARPHRD_VOID, buf, buflen);
default:
- return "???";
- }
-@@ -713,6 +715,7 @@ const char *format_host(int af, int len,
- case AF_INET6:
- len = 16;
- break;
-+#ifndef IPROUTE2_TINY
- case AF_IPX:
- len = 10;
- break;
-@@ -723,6 +726,7 @@ const char *format_host(int af, int len,
- len = 2;
- break;
- #endif
-+#endif
- default: ;
- }
- }
--- a/lib/Makefile
+++ b/lib/Makefile
-@@ -4,6 +4,10 @@ ifeq ($(IP_CONFIG_SETNS),y)
- CFLAGS += -DHAVE_SETNS
+@@ -12,6 +12,10 @@ ifeq ($(HAVE_MNL),y)
+ CFLAGS += -DHAVE_LIBMNL $(shell $(PKG_CONFIG) libmnl --cflags)
endif
+ifeq ($(IP_CONFIG_TINY),y)
+
CFLAGS += $(FPIC)
- UTILOBJ=utils.o rt_names.o ll_types.o ll_proto.o ll_addr.o inet_proto.o namespace.o
+ UTILOBJ = utils.o rt_names.o ll_types.o ll_proto.o ll_addr.o \