iproute2: update to 4.3.0
[openwrt/staging/yousong.git] / package / network / utils / iproute2 / patches / 300-ip_tiny.patch
index 14518dce1cf6bcc9f03fba1488cd2c6e26f23bae..c0ebfd3ce5c9cf5fc71aa7571a88d96dd208c01c 100644 (file)
@@ -25,7 +25,7 @@
                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 {
+@@ -73,30 +73,42 @@ static const struct cmd {
        int (*func)(int argc, char **argv);
  } cmds[] = {
        { "address",    do_ipaddr },
@@ -44,7 +44,7 @@
        { "link",       do_iplink },
 +#ifndef IPROUTE2_TINY
        { "l2tp",       do_ipl2tp },
-       { "fou",        do_ipfou },
+       { "fou",        do_ipfou },
 +#endif
        { "tunnel",     do_iptunnel },
        { "tunl",       do_iptunnel },
@@ -53,7 +53,7 @@
        { "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
  };
 --- a/lib/utils.c
 +++ b/lib/utils.c
-@@ -642,6 +642,7 @@ const char *rt_addr_n2a(int af, const vo
-       case AF_INET:
-       case AF_INET6:
+@@ -675,6 +675,7 @@ const char *rt_addr_n2a(int af, int len,
                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:
-@@ -650,6 +651,7 @@ const char *rt_addr_n2a(int af, const vo
+@@ -683,6 +684,7 @@ const char *rt_addr_n2a(int af, int len,
                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 "???";
-       }
 --- a/lib/Makefile
 +++ b/lib/Makefile
 @@ -4,6 +4,10 @@ ifeq ($(IP_CONFIG_SETNS),y)