iproute2: update to version 4.15.0
[openwrt/staging/chunkeey.git] / package / network / utils / iproute2 / patches / 300-ip_tiny.patch
index c0ebfd3ce5c9cf5fc71aa7571a88d96dd208c01c..d06e91e372b563e129822eb54a3c95baa5586ea2 100644 (file)
@@ -1,8 +1,8 @@
 --- a/ip/Makefile
 +++ b/ip/Makefile
-@@ -16,6 +16,13 @@ ifeq ($(IP_CONFIG_SETNS),y)
-       CFLAGS += -DHAVE_SETNS
- endif
+@@ -16,6 +16,13 @@ RTMONOBJ=rtmon.o
+ include ../config.mk
  
 +STATIC_SYM_FILTER:=
 +ifeq ($(IP_CONFIG_TINY),y)
@@ -14,7 +14,7 @@
  ALLOBJ=$(IPOBJ) $(RTMONOBJ)
  SCRIPTS=ifcfg rtpr routel routef
  TARGETS=ip rtmon
-@@ -43,7 +50,7 @@ else
+@@ -45,7 +52,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
-@@ -73,30 +73,42 @@ static const struct cmd {
+@@ -48,10 +48,16 @@ static void usage(void)
+       fprintf(stderr,
+ "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"
++#else
++"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 |\n"
+ "                    -f[amily] { inet | inet6 | ipx | dnet | mpls | bridge | link } |\n"
+@@ -73,32 +79,44 @@ static const struct cmd {
        int (*func)(int argc, char **argv);
  } cmds[] = {
        { "address",    do_ipaddr },
@@ -46,6 +63,8 @@
        { "l2tp",       do_ipl2tp },
        { "fou",        do_ipfou },
 +#endif
+       { "ila",        do_ipila },
+       { "macsec",     do_ipmacsec },
        { "tunnel",     do_iptunnel },
        { "tunl",       do_iptunnel },
 +#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
-@@ -675,6 +675,7 @@ const char *rt_addr_n2a(int af, int len,
+@@ -885,6 +885,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);
@@ -78,7 +97,7 @@
        case AF_IPX:
                return ipx_ntop(af, addr, buf, buflen);
        case AF_DECnet:
-@@ -683,6 +684,7 @@ const char *rt_addr_n2a(int af, int len,
+@@ -894,6 +895,7 @@ const char *rt_addr_n2a_r(int af, int le
                memcpy(dna.a_addr, addr, 2);
                return dnet_ntop(af, &dna, buf, buflen);
        }
        default:
 --- a/lib/Makefile
 +++ b/lib/Makefile
-@@ -4,6 +4,10 @@ ifeq ($(IP_CONFIG_SETNS),y)
-       CFLAGS += -DHAVE_SETNS
- endif
+@@ -3,6 +3,10 @@ include ../config.mk
+ CFLAGS += $(FPIC)
  
 +ifeq ($(IP_CONFIG_TINY),y)
 +  CFLAGS += -DIPROUTE2_TINY
 +endif
 +
- 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 \
+       inet_proto.o namespace.o json_writer.o json_print.o \
+       names.o color.o bpf.o exec.o fs.o