]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Merge branch 'master' into net-next
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 22 Aug 2017 00:14:19 +0000 (17:14 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 22 Aug 2017 00:14:19 +0000 (17:14 -0700)
1  2 
include/utils.h
ip/iproute.c

diff --combined include/utils.h
index 565bda60097b5bdaf62e76538ec61998d556ae57,7a3b3fd24058f8546ac76f611be0599d38677edd..1bb6d6a23da9bbc6dcd70556fce6e3394f29a318
@@@ -20,7 -20,6 +20,7 @@@ extern int show_raw
  extern int resolve_hosts;
  extern int oneline;
  extern int brief;
 +extern int json;
  extern int timestamp;
  extern int timestamp_short;
  extern const char * _SL_;
@@@ -196,6 -195,8 +196,8 @@@ static inline void __jiffies_to_tv(stru
  int print_timestamp(FILE *fp);
  void print_nlmsg_timestamp(FILE *fp, const struct nlmsghdr *n);
  
+ #define BIT(nr)                 (1UL << (nr))
  #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
  
  #define BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2 * !!(cond)]))
diff --combined ip/iproute.c
index be9181a6704d2229dc372282a13c81c0e223f254,89caac124f4897c445bec4fb503c9630dcab68ae..621b5ca9dc7c779dcf1d7ab9960935a983921c7a
@@@ -100,7 -100,7 +100,7 @@@ static void usage(void
        fprintf(stderr, "TIME := NUMBER[s|ms]\n");
        fprintf(stderr, "BOOL := [1|0]\n");
        fprintf(stderr, "FEATURES := ecn\n");
 -      fprintf(stderr, "ENCAPTYPE := [ mpls | ip | ip6 | seg6 ]\n");
 +      fprintf(stderr, "ENCAPTYPE := [ mpls | ip | ip6 | seg6 | seg6local ]\n");
        fprintf(stderr, "ENCAPHDR := [ MPLSLABEL | SEG6HDR ]\n");
        fprintf(stderr, "SEG6HDR := [ mode SEGMODE ] segs ADDR1,ADDRi,ADDRn [hmac HMACKEYID] [cleanup]\n");
        fprintf(stderr, "SEGMODE := [ encap | inline ]\n");
@@@ -624,7 -624,7 +624,7 @@@ int print_route(const struct sockaddr_n
        }
        if (tb[RTA_MULTIPATH]) {
                struct rtnexthop *nh = RTA_DATA(tb[RTA_MULTIPATH]);
-               int first = 0;
+               int first = 1;
  
                len = RTA_PAYLOAD(tb[RTA_MULTIPATH]);
  
                        if (nh->rtnh_len > len)
                                break;
                        if (r->rtm_flags&RTM_F_CLONED && r->rtm_type == RTN_MULTICAST) {
-                               if (first)
+                               if (first) {
                                        fprintf(fp, "Oifs: ");
-                               else
+                                       first = 0;
+                               } else {
                                        fprintf(fp, " ");
+                               }
                        } else
                                fprintf(fp, "%s\tnexthop ", _SL_);
                        if (nh->rtnh_len > sizeof(*nh)) {
                                fprintf(fp, "onlink ");
                        if (nh->rtnh_flags & RTNH_F_PERVASIVE)
                                fprintf(fp, "pervasive ");
 +                      if (nh->rtnh_flags & RTNH_F_OFFLOAD)
 +                              fprintf(fp, "offload ");
                        if (nh->rtnh_flags & RTNH_F_LINKDOWN)
                                fprintf(fp, "linkdown ");
                        len -= NLMSG_ALIGN(nh->rtnh_len);