]> git.puffer.fish Git - mirror/frr.git/commitdiff
Merge remote-tracking branch 'origin/master' into evpn_plus_struct_attr
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 14 Jul 2017 12:24:46 +0000 (08:24 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 14 Jul 2017 12:24:46 +0000 (08:24 -0400)
25 files changed:
1  2 
bgpd/bgp_attr.c
bgpd/bgp_debug.c
bgpd/bgp_evpn_vty.c
bgpd/bgp_mplsvpn.c
bgpd/bgp_mplsvpn.h
bgpd/bgp_nexthop.c
bgpd/bgp_route.c
bgpd/bgp_route.h
bgpd/bgp_routemap.c
bgpd/bgp_updgrp_adv.c
bgpd/bgp_updgrp_packet.c
bgpd/bgp_vty.c
bgpd/bgpd.c
bgpd/rfapi/rfapi.c
bgpd/rfapi/rfapi_rib.c
bgpd/rfapi/rfapi_vty.c
lib/command.c
lib/command.h
lib/vty.c
vtysh/vtysh.c
zebra/debug.c
zebra/interface.c
zebra/zebra_vrf.c
zebra/zebra_vty.c
zebra/zserv.c

diff --cc bgpd/bgp_attr.c
Simple merge
Simple merge
Simple merge
Simple merge
index eeb2f63ff362020c1bbb13260c63c6f7b0b5db66,98806abc36c4aba3fbf3265e78715bf4c4b7f060..8d4f5f8067589e811d02b7645084911457571382
@@@ -60,12 -68,37 +60,12 @@@ typedef enum 
    "Address Family\n"
  
  #define V4_HEADER \
-   "   Network          Next Hop            Metric LocPrf Weight Path"
+   "   Network          Next Hop            Metric LocPrf Weight Path\n"
  #define V4_HEADER_TAG \
-   "   Network          Next Hop      In tag/Out tag"
+   "   Network          Next Hop      In tag/Out tag\n"
  #define V4_HEADER_OVERLAY \
-   "   Network          Next Hop      EthTag    Overlay Index   RouterMac"
+   "   Network          Next Hop      EthTag    Overlay Index   RouterMac\n"
  
 -struct rd_as
 -{
 -  u_int16_t type;
 -  as_t as;
 -  u_int32_t val;
 -};
 -
 -struct rd_ip
 -{
 -  u_int16_t type;
 -  struct in_addr ip;
 -  u_int16_t val;
 -};
 -
 -#if ENABLE_BGP_VNC
 -struct rd_vnc_eth
 -{
 -  u_int16_t type;
 -  uint8_t local_nve_id;
 -  struct ethaddr macaddr;
 -};
 -#endif
 -
 -extern u_int16_t decode_rd_type (u_char *);
 -extern void encode_rd_type (u_int16_t, u_char *);
  extern void bgp_mplsvpn_init (void);
  extern int bgp_nlri_parse_vpn (struct peer *, struct attr *, struct bgp_nlri *);
  extern u_int32_t decode_label (mpls_label_t *);
Simple merge
index 3b9e98f028ca162a230e2f884e1db1d4d8de29e0,c2694b82bbd131ff0ce648c1d6c8a28a50f93441..00708c487162482593e5d2cd28ebf2e66d4672e4
@@@ -6956,35 -6824,38 +6956,35 @@@ route_vty_out_overlay (struct vty *vty
        }
      }
  
 -  if(attr->extra)
 +  struct eth_segment_id *id = &(attr->evpn_overlay.eth_s_id);
 +  char *str = esi2str(id);
 +  vty_out (vty, "%s", str);
 +  XFREE (MTYPE_TMP, str);
 +  if (IS_EVPN_PREFIX_IPADDR_V4((struct prefix_evpn *)p))
      {
 -      struct eth_segment_id *id = &(attr->extra->evpn_overlay.eth_s_id);
 -      char *str = esi2str(id);
 -      vty_out (vty, "%s", str);
 -      XFREE (MTYPE_TMP, str);
 -      if (IS_EVPN_PREFIX_IPADDR_V4((struct prefix_evpn *)p))
 -      {
 -          vty_out (vty, "/%s", inet_ntoa (attr->extra->evpn_overlay.gw_ip.ipv4));
 -      }
 -      else if (IS_EVPN_PREFIX_IPADDR_V6((struct prefix_evpn *)p))
 -      {
 -          vty_out (vty, "/%s",
 -                   inet_ntop (AF_INET6, &(attr->extra->evpn_overlay.gw_ip.ipv6),
 -                              buf, BUFSIZ));
 -      }
 -      if(attr->extra->ecommunity)
 -        {
 -          char *mac = NULL;
 -          struct ecommunity_val *routermac = ecommunity_lookup (attr->extra->ecommunity,
 -                                                                ECOMMUNITY_ENCODE_EVPN,
 -                                                                ECOMMUNITY_EVPN_SUBTYPE_ROUTERMAC);
 -          if(routermac)
 -            mac = ecom_mac2str((char *)routermac->val);
 -          if(mac)
 -            {
 -              vty_out (vty, "/%s",(char *)mac);
 -              XFREE(MTYPE_TMP, mac);
 -            }
 +      vty_out (vty, "/%s", inet_ntoa (attr->evpn_overlay.gw_ip.ipv4));
 +    }
 +  else if (IS_EVPN_PREFIX_IPADDR_V6((struct prefix_evpn *)p))
 +    {
 +      vty_out (vty, "/%s",
 +               inet_ntop (AF_INET6, &(attr->evpn_overlay.gw_ip.ipv6),
 +                          buf, BUFSIZ));
 +    }
 +  if(attr->ecommunity)
 +    {
 +      char *mac = NULL;
 +      struct ecommunity_val *routermac = ecommunity_lookup (attr->ecommunity,
 +                                                            ECOMMUNITY_ENCODE_EVPN,
 +                                                            ECOMMUNITY_EVPN_SUBTYPE_ROUTERMAC);
 +      if(routermac)
 +        mac = ecom_mac2str((char *)routermac->val);
 +      if(mac)
 +        {
 +          vty_out (vty, "/%s",(char *)mac);
 +          XFREE(MTYPE_TMP, mac);
          }
      }
-   vty_out (vty, VTYNL);
+   vty_out (vty, "\n");
  }
  
  /* dampening route */
@@@ -7508,10 -7343,10 +7508,10 @@@ route_vty_out_detail (struct vty *vty, 
        }
  
        if (!json_paths)
-         vty_out (vty, VTYNL);
+         vty_out (vty, "\n");
  
        /* display the link-local nexthop */
 -      if (attr->extra && attr->extra->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL)
 +      if (attr->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL)
        {
            if (json_paths)
              {
              }
            else
              {
-             vty_outln (vty, "    (%s) %s",
+             vty_out (vty, "    (%s) %s\n",
 -                       inet_ntop (AF_INET6, &attr->extra->mp_nexthop_local,
 +                       inet_ntop (AF_INET6, &attr->mp_nexthop_local,
                                  buf, INET6_ADDRSTRLEN),
 -                       attr->extra->mp_nexthop_prefer_global ? "(prefer-global)" : "(used)");
 +                       attr->mp_nexthop_prefer_global ? "(prefer-global)" : "(used)");
              }
        }
        /* If we do not have a link-local nexthop then we must flag the global as "used" */
              }
            else
              {
-              vty_outln (vty, "      Extended Community: %s",
+              vty_out (vty, "      Extended Community: %s\n",
 -                      attr->extra->ecommunity->str);
 +                      attr->ecommunity->str);
              }
          }
  
        /* Line 6 display Large community */
        if (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_LARGE_COMMUNITIES))
-         vty_outln (vty, "      Large Community: %s",
 -        vty_out (vty, "      Large Community: %s\n",
 -                 attr->extra->lcommunity->str);
++        vty_outln (vty, "      Large Community: %s\n",
 +                 attr->lcommunity->str);
  
        /* Line 7 display Originator, Cluster-id */
        if ((attr->flag & ATTR_FLAG_BIT(BGP_ATTR_ORIGINATOR_ID)) ||
          }
  
        /* Label Index */
 -      if (attr->extra->label_index != BGP_INVALID_LABEL_INDEX)
 +      if (attr->label_index != BGP_INVALID_LABEL_INDEX)
          {
            if (json_paths)
 -            json_object_int_add(json_path, "labelIndex", attr->extra->label_index);
 +            json_object_int_add(json_path, "labelIndex", attr->label_index);
            else
-             vty_outln (vty, "      Label Index: %d",
+             vty_out (vty, "      Label Index: %d\n",
 -                      attr->extra->label_index);
 +                      attr->label_index);
          }
  
        /* Line 8 display Addpath IDs */
@@@ -8355,16 -8169,11 +8353,16 @@@ route_vty_out_detail_header (struct vt
               ((safi == SAFI_MPLS_VPN) || (safi == SAFI_EVPN)) ? ":" : "",
               buf2,
               p->prefixlen);
 +#endif
  
        if (has_valid_label)
-         vty_outln (vty, "Local label: %d", label);
+         vty_out (vty, "Local label: %d\n", label);
 -      else if (bgp_labeled_safi(safi))
 -        vty_out (vty, "Local label: not allocated\n");
 +#if defined (HAVE_CUMULUS)
 +      if (bgp_labeled_safi(safi) && safi != SAFI_EVPN)
 +#else
 +      if (bgp_labeled_safi(safi))
 +#endif
-         vty_out(vty, "not allocated%s", VTY_NEWLINE);
++        vty_out(vty, "not allocated\n");
      }
  
    for (ri = rn->info; ri; ri = ri->next)
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc bgpd/bgp_vty.c
index cd6f6e0dfbb694059e102a91d6d976c859f00966,903793624f4ae33e0d92ee50902b467f29744991..9d0f6b44ddd1ceadc0f920cb4c55bfe56495d386
@@@ -6738,13 -6708,16 +6708,12 @@@ DEFUN (show_bgp_memory
  
    /* Attributes */
    count = attr_count();
-   vty_out (vty, "%ld BGP attributes, using %s of memory%s", count,
+   vty_out (vty, "%ld BGP attributes, using %s of memory\n", count,
             mtype_memstr (memstrbuf, sizeof (memstrbuf),
-                          count * sizeof(struct attr)),
-            VTYNL);
+                          count * sizeof(struct attr)));
 -  if ((count = mtype_stats_alloc (MTYPE_ATTR_EXTRA)))
 -    vty_out (vty, "%ld BGP extra attributes, using %s of memory\n", count,
 -             mtype_memstr (memstrbuf, sizeof (memstrbuf),
 -                           count * sizeof(struct attr_extra)));
  
    if ((count = attr_unknown_count()))
-     vty_out (vty, "%ld unknown attributes%s", count, VTYNL);
+     vty_out (vty, "%ld unknown attributes\n", count);
  
    /* AS_PATH attributes */
    count = aspath_count ();
diff --cc bgpd/bgpd.c
index 19c4924a56ff292059555496b74f70bb28c45980,a0a86136fbda73b7161df1a387869478d014177f..1b0d78ff9a1b4f2be2e49914c1383c5b0091e54c
@@@ -7379,11 -7367,8 +7379,11 @@@ bgp_config_write_family (struct vty *vt
    bgp_config_write_maxpaths (vty, bgp, afi, safi, &write);
    bgp_config_write_table_map (vty, bgp, afi, safi, &write);
  
 +  if (safi == SAFI_EVPN)
 +    bgp_config_write_evpn_info (vty, bgp, afi, safi, &write);
 +
    if (write)
-     vty_outln (vty, " exit-address-family");
+     vty_out (vty, " exit-address-family\n");
  
    return write;
  }
Simple merge
Simple merge
Simple merge
diff --cc lib/command.c
Simple merge
diff --cc lib/command.h
Simple merge
diff --cc lib/vty.c
Simple merge
diff --cc vtysh/vtysh.c
Simple merge
diff --cc zebra/debug.c
index dd1c5d782869bd9e7a9a0afdea83f750f42b8710,f99e06bbbe8b6e3f576171aa766794aa94de7987..763bf359baab152d9819d153282e9abaa2a1b976
@@@ -440,14 -410,9 +434,14 @@@ config_write_debug (struct vty *vty
      }
    if (IS_ZEBRA_DEBUG_MPLS)
      {
-       vty_out (vty, "debug zebra mpls%s", VTYNL);
+       vty_out (vty, "debug zebra mpls\n");
        write++;
      }
 +  if (IS_ZEBRA_DEBUG_VXLAN)
 +    {
 +      vty_out (vty, "debug zebra vxlan%s", VTY_NEWLINE);
 +      write++;
 +    }
    return write;
  }
  
Simple merge
Simple merge
Simple merge
diff --cc zebra/zserv.c
index d891d0bd49cec756e163ccfd14b1178c96b57a0d,e3c8ea0ddab4551ff1d917cdf70bc76d2e387fea..15feb78c08b4d56b6f32ebe9855278b3cb3f6e9a
@@@ -2702,51 -2686,47 +2702,51 @@@ zebra_show_client_detail (struct vty *v
           zserv_time_buf(&client->connect_time, cbuf, ZEBRA_TIME_BUF));
    if (client->nh_reg_time)
      {
-       vty_outln (vty, "Nexthop Registry Time: %s ",
+       vty_out (vty, "Nexthop Registry Time: %s \n",
               zserv_time_buf(&client->nh_reg_time, nhbuf, ZEBRA_TIME_BUF));
        if (client->nh_last_upd_time)
-       vty_outln (vty, "Nexthop Last Update Time: %s ",
+       vty_out (vty, "Nexthop Last Update Time: %s \n",
                 zserv_time_buf(&client->nh_last_upd_time, mbuf, ZEBRA_TIME_BUF));
        else
-               vty_outln (vty, "No Nexthop Update sent");
+               vty_out (vty, "No Nexthop Update sent\n");
      }
    else
-     vty_outln (vty, "Not registered for Nexthop Updates");
+     vty_out (vty, "Not registered for Nexthop Updates\n");
  
-   vty_outln (vty, "Last Msg Rx Time: %s ",
+   vty_out (vty, "Last Msg Rx Time: %s \n",
           zserv_time_buf(&client->last_read_time, rbuf, ZEBRA_TIME_BUF));
-   vty_outln (vty, "Last Msg Tx Time: %s ",
+   vty_out (vty, "Last Msg Tx Time: %s \n",
           zserv_time_buf(&client->last_write_time, wbuf, ZEBRA_TIME_BUF));
    if (client->last_read_time)
-     vty_outln (vty, "Last Rcvd Cmd: %s ",
+     vty_out (vty, "Last Rcvd Cmd: %s \n",
             zserv_command_string(client->last_read_cmd));
    if (client->last_write_time)
-     vty_outln (vty, "Last Sent Cmd: %s ",
+     vty_out (vty, "Last Sent Cmd: %s \n",
             zserv_command_string(client->last_write_cmd));
-   vty_out (vty, VTYNL);
+   vty_out (vty, "\n");
  
-   vty_outln (vty, "Type        Add        Update     Del ");
-   vty_outln (vty, "================================================== ");
-   vty_outln (vty, "IPv4        %-12d%-12d%-12d", client->v4_route_add_cnt,
+   vty_out (vty, "Type        Add        Update     Del \n");
+   vty_out (vty, "================================================== \n");
+   vty_out (vty, "IPv4        %-12d%-12d%-12d\n", client->v4_route_add_cnt,
           client->v4_route_upd8_cnt, client->v4_route_del_cnt);
-   vty_outln (vty, "IPv6        %-12d%-12d%-12d", client->v6_route_add_cnt,
+   vty_out (vty, "IPv6        %-12d%-12d%-12d\n", client->v6_route_add_cnt,
           client->v6_route_upd8_cnt, client->v6_route_del_cnt);
-   vty_outln (vty, "Redist:v4   %-12d%-12d%-12d", client->redist_v4_add_cnt, 0,
+   vty_out (vty, "Redist:v4   %-12d%-12d%-12d\n", client->redist_v4_add_cnt, 0,
           client->redist_v4_del_cnt);
-   vty_outln (vty, "Redist:v6   %-12d%-12d%-12d", client->redist_v6_add_cnt, 0,
+   vty_out (vty, "Redist:v6   %-12d%-12d%-12d\n", client->redist_v6_add_cnt, 0,
           client->redist_v6_del_cnt);
-   vty_outln (vty, "Connected   %-12d%-12d%-12d", client->ifadd_cnt, 0,
+   vty_out (vty, "Connected   %-12d%-12d%-12d\n", client->ifadd_cnt, 0,
           client->ifdel_cnt);
-   vty_outln (vty, "BFD peer    %-12d%-12d%-12d", client->bfd_peer_add_cnt,
+   vty_out (vty, "BFD peer    %-12d%-12d%-12d\n", client->bfd_peer_add_cnt,
         client->bfd_peer_upd8_cnt, client->bfd_peer_del_cnt);
-   vty_outln (vty, "Interface Up Notifications: %d",client->ifup_cnt);
-   vty_outln (vty, "Interface Down Notifications: %d",client->ifdown_cnt);
-   vty_outln (vty, "VNI add notifications: %d", client->vniadd_cnt);
-   vty_outln (vty, "VNI delete notifications: %d", client->vnidel_cnt);
-   vty_outln (vty, "MAC-IP add notifications: %d", client->macipadd_cnt);
-   vty_outln (vty, "MAC-IP delete notifications: %d", client->macipdel_cnt);
-   vty_out (vty, VTYNL);
+   vty_out (vty, "Interface Up Notifications: %d\n",client->ifup_cnt);
+   vty_out (vty, "Interface Down Notifications: %d\n",client->ifdown_cnt);
++  vty_out (vty, "VNI add notifications: %d\n", client->vniadd_cnt);
++  vty_out (vty, "VNI delete notifications: %d\n", client->vnidel_cnt);
++  vty_out (vty, "MAC-IP add notifications: %d\n", client->macipadd_cnt);
++  vty_out (vty, "MAC-IP delete notifications: %d\n", client->macipdel_cnt);
+   vty_out (vty, "\n");
    return;
  }