iproute2: update to v4.0.0
[openwrt/staging/chunkeey.git] / package / network / utils / iproute2 / patches / 300-ip_tiny.patch
index 43afb9c848fb92980c1e2d8ff81f969987edc0b8..14518dce1cf6bcc9f03fba1488cd2c6e26f23bae 100644 (file)
@@ -1,6 +1,6 @@
 --- a/ip/Makefile
 +++ b/ip/Makefile
-@@ -15,6 +15,13 @@ ifeq ($(IP_CONFIG_SETNS),y)
+@@ -16,6 +16,13 @@ ifeq ($(IP_CONFIG_SETNS),y)
        CFLAGS += -DHAVE_SETNS
  endif
  
                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
-@@ -66,29 +66,41 @@ static const struct cmd {
+@@ -71,30 +71,42 @@ static const struct cmd {
        int (*func)(int argc, char **argv);
  } cmds[] = {
-       { "address",    do_ipaddr },
+       { "address",    do_ipaddr },
 +#ifndef IPROUTE2_TINY
        { "addrlabel",  do_ipaddrlabel },
 +#endif
@@ -44,6 +44,7 @@
        { "link",       do_iplink },
 +#ifndef IPROUTE2_TINY
        { "l2tp",       do_ipl2tp },
+       { "fou",        do_ipfou },
 +#endif
        { "tunnel",     do_iptunnel },
        { "tunl",       do_iptunnel },
@@ -69,7 +70,7 @@
  };
 --- a/lib/utils.c
 +++ b/lib/utils.c
-@@ -627,6 +627,7 @@ const char *rt_addr_n2a(int af, int len,
+@@ -642,6 +642,7 @@ const char *rt_addr_n2a(int af, const vo
        case AF_INET:
        case AF_INET6:
                return inet_ntop(af, addr, buf, buflen);
@@ -77,7 +78,7 @@
        case AF_IPX:
                return ipx_ntop(af, addr, buf, buflen);
        case AF_DECnet:
-@@ -635,6 +636,7 @@ const char *rt_addr_n2a(int af, int len,
+@@ -650,6 +651,7 @@ const char *rt_addr_n2a(int af, const vo
                memcpy(dna.a_addr, addr, 2);
                return dnet_ntop(af, &dna, buf, buflen);
        }
        default:
                return "???";
        }
-@@ -710,6 +712,7 @@ const char *format_host(int af, int len,
-                       case AF_INET6:
-                               len = 16;
-                               break;
-+#ifndef IPROUTE2_TINY
-                       case AF_IPX:
-                               len = 10;
-                               break;
-@@ -720,6 +723,7 @@ const char *format_host(int af, int len,
-                               len = 2;
-                               break;
- #endif
-+#endif
-                       default: ;
-                       }
-               }
 --- a/lib/Makefile
 +++ b/lib/Makefile
-@@ -1,5 +1,9 @@
- include ../Config
+@@ -4,6 +4,10 @@ ifeq ($(IP_CONFIG_SETNS),y)
+       CFLAGS += -DHAVE_SETNS
+ endif
  
 +ifeq ($(IP_CONFIG_TINY),y)
 +  CFLAGS += -DIPROUTE2_TINY
 +
  CFLAGS += $(FPIC)
  
- UTILOBJ=utils.o rt_names.o ll_types.o ll_proto.o ll_addr.o inet_proto.o
+ UTILOBJ=utils.o rt_names.o ll_types.o ll_proto.o ll_addr.o inet_proto.o namespace.o \