]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge remote-tracking branch 'origin/stable/3.0'
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 17 May 2017 12:51:25 +0000 (08:51 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 17 May 2017 12:51:25 +0000 (08:51 -0400)
1  2 
ospf6d/ospf6_area.c
ospfd/ospf_vty.c
pimd/pim_cmd.c

diff --combined ospf6d/ospf6_area.c
index 7c66cbdc7f5a3ec9e970dbf0dec3d2aa6a460c10,2b25585e6c4264d4ea44924de9ff830d31274164..2cd77ac42c45940321fb21ac672a49bad19fb214
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   * General Public License for more details.
   *
 - * You should have received a copy of the GNU General Public License
 - * along with GNU Zebra; see the file COPYING.  If not, write to the 
 - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
 - * Boston, MA 02111-1307, USA.  
 + * You should have received a copy of the GNU General Public License along
 + * with this program; see the file COPYING; if not, write to the Free Software
 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
   */
  
  #include <zebra.h>
@@@ -522,6 -523,7 +522,7 @@@ DEFUN (no_area_range
         "Advertised metric for this range\n")
  {
    int idx_ipv4 = 2;
+   int idx_ipv6 = 4;
    int ret;
    struct ospf6_area *oa;
    struct prefix prefix;
  
    OSPF6_CMD_AREA_GET (argv[idx_ipv4]->arg, oa);
  
-   ret = str2prefix (argv[idx_ipv4]->arg, &prefix);
+   ret = str2prefix (argv[idx_ipv6]->arg, &prefix);
    if (ret != 1 || prefix.family != AF_INET6)
      {
-       vty_out (vty, "Malformed argument: %s%s", argv[idx_ipv4]->arg, VNL);
+       vty_out (vty, "Malformed argument: %s%s", argv[idx_ipv6]->arg, VNL);
        return CMD_SUCCESS;
      }
  
    range = ospf6_route_lookup (&prefix, oa->range_table);
    if (range == NULL)
      {
-       vty_out (vty, "Range %s does not exists.%s", argv[idx_ipv4]->arg, VNL);
+       vty_out (vty, "Range %s does not exists.%s", argv[idx_ipv6]->arg, VNL);
        return CMD_SUCCESS;
      }
  
    return CMD_SUCCESS;
  }
  
  void
  ospf6_area_config_write (struct vty *vty)
  {
diff --combined ospfd/ospf_vty.c
index e989f8123a648bd8ddc01c4468e95b07f2fc89d5,44bf1b8667a3178bceafc297ca85dffb8c66f792..22fbf28e5279e85a522ad366434d0dc4833743f3
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   * General Public License for more details.
   *
 - * You should have received a copy of the GNU General Public License
 - * along with GNU Zebra; see the file COPYING.  If not, write to the Free
 - * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 - * 02111-1307, USA.  
 + * You should have received a copy of the GNU General Public License along
 + * with this program; see the file COPYING; if not, write to the Free Software
 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
   */
  
  #include <zebra.h>
@@@ -6332,7 -6333,7 +6332,7 @@@ DEFUN (no_ip_ospf_dead_interval
  {
    VTY_DECLVAR_CONTEXT(interface, ifp);
    int idx_ipv4 = argc - 1;
 -  struct in_addr addr;
 +  struct in_addr addr = { .s_addr = 0L};
    int ret;
    struct ospf_if_params *params;
    struct ospf_interface *oi;
@@@ -6464,7 -6465,6 +6464,7 @@@ DEFUN (no_ip_ospf_hello_interval
    int idx = 0;
    struct in_addr addr;
    struct ospf_if_params *params;
 +
    params = IF_DEF_PARAMS (ifp);
  
    if (argv_find (argv, argc, "A.B.C.D", &idx))
@@@ -7160,7 -7160,7 +7160,7 @@@ DEFUN (no_ospf_redistribute_source
  
  DEFUN (ospf_redistribute_instance_source,
         ospf_redistribute_instance_source_cmd,
-        "redistribute <ospf|table> (1-65535) {metric (0-16777214)|metric-type (1-2)|route-map WORD}",
+        "redistribute <ospf|table> (1-65535) [{metric (0-16777214)|metric-type (1-2)|route-map WORD}]",
         REDIST_STR
         "Open Shortest Path First\n"
         "Non-main Kernel Routing Table\n"
  
  DEFUN (no_ospf_redistribute_instance_source,
         no_ospf_redistribute_instance_source_cmd,
-        "no redistribute <ospf|table> (1-65535) {metric (0-16777214)|metric-type (1-2)|route-map WORD}",
+        "no redistribute <ospf|table> (1-65535) [{metric (0-16777214)|metric-type (1-2)|route-map WORD}]",
         NO_STR
         REDIST_STR
         "Open Shortest Path First\n"
diff --combined pimd/pim_cmd.c
index 3d816dd37ea1c630b2baa16db8a78e630bd35545,d5dbe4f7ab14deb0198f56e14b513e439794f35d..da07dcb4acbe769021e4045eceb8378ba00b21a6
@@@ -1,21 -1,22 +1,21 @@@
  /*
 -  PIM for Quagga
 -  Copyright (C) 2008  Everton da Silva Marques
 -
 -  This program is free software; you can redistribute it and/or modify
 -  it under the terms of the GNU General Public License as published by
 -  the Free Software Foundation; either version 2 of the License, or
 -  (at your option) any later version.
 -
 -  This program is distributed in the hope that it will be useful, but
 -  WITHOUT ANY WARRANTY; without even the implied warranty of
 -  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 -  General Public License for more details.
 -  
 -  You should have received a copy of the GNU General Public License
 -  along with this program; see the file COPYING; if not, write to the
 -  Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
 -  MA 02110-1301 USA
 -*/
 + * PIM for Quagga
 + * Copyright (C) 2008  Everton da Silva Marques
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
 + * the Free Software Foundation; either version 2 of the License, or
 + * (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful, but
 + * WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 + * General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License along
 + * with this program; see the file COPYING; if not, write to the Free Software
 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 + */
  
  #include <zebra.h>
  
@@@ -819,7 -820,6 +819,7 @@@ static void pim_show_interfaces_single(
      mloop = pim_socket_mcastloop_get(pim_ifp->pim_sock_fd);
  
      if (uj) {
 +      char pbuf[PREFIX2STR_BUFFER];
        json_row = json_object_new_object();
        json_object_pim_ifp_add(json_row, ifp);
  
  
          sec_list = json_object_new_array();
          for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, sec_node, sec_addr)) {
 -          json_object_array_add(sec_list, json_object_new_string(inet_ntoa(sec_addr->addr)));
 +          json_object_array_add(sec_list,
 +                                json_object_new_string(prefix2str(&sec_addr->addr,
 +                                                                pbuf,
 +                                                                sizeof(pbuf))));
          }
          json_object_object_add(json_row, "secondaryAddressList", sec_list);
        }
          vty_out(vty, "Use Source : %s%s", inet_ntoa(pim_ifp->update_source), VTY_NEWLINE);
        }
        if (pim_ifp->sec_addr_list) {
 +        char pbuf[PREFIX2STR_BUFFER];
          vty_out(vty, "Address    : %s (primary)%s",
 -                                    inet_ntoa(ifaddr), VTY_NEWLINE);
 +                inet_ntoa(ifaddr), VTY_NEWLINE);
          for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, sec_node, sec_addr)) {
            vty_out(vty, "             %s%s",
 -                                    inet_ntoa(sec_addr->addr), VTY_NEWLINE);
 +                  prefix2str(&sec_addr->addr,
 +                           pbuf,
 +                           sizeof(pbuf)), VTY_NEWLINE);
          }
        } else {
          vty_out(vty, "Address    : %s%s", inet_ntoa(ifaddr), VTY_NEWLINE);
@@@ -1122,163 -1116,6 +1122,163 @@@ static void pim_show_interfaces(struct 
    json_object_free(json);
  }
  
 +static void pim_show_interface_traffic (struct vty *vty, u_char uj)
 +{
 +  struct interface *ifp = NULL;
 +  struct pim_interface *pim_ifp = NULL;
 +  struct listnode *node = NULL;
 +  json_object *json = NULL;
 +  json_object *json_row = NULL;
 +
 +  if (uj)
 +    json = json_object_new_object ();
 +  else
 +    {
 +      vty_out (vty, "%s", VTY_NEWLINE);
 +      vty_out (vty, "%-12s%-17s%-17s%-17s%-17s%-17s%-17s%s", "Interface",
 +               "    HELLO", "    JOIN", "   PRUNE", "   REGISTER",
 +               "  REGISTER-STOP", "  ASSERT", VTY_NEWLINE);
 +      vty_out (vty,
 +               "%-10s%-18s%-17s%-17s%-17s%-17s%-17s%s",
 +               "", "      Rx/Tx", "     Rx/Tx", "    Rx/Tx", "    Rx/Tx",
 +               "     Rx/Tx", "    Rx/Tx", VTY_NEWLINE);
 +      vty_out (vty,
 +           "---------------------------------------------------------------------------------------------------------------%s",
 +           VTY_NEWLINE);
 +    }
 +
 +  for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp))
 +    {
 +      pim_ifp = ifp->info;
 +
 +      if (!pim_ifp)
 +        continue;
 +
 +      if (pim_ifp->pim_sock_fd < 0)
 +        continue;
 +      if (uj)
 +        {
 +          json_row = json_object_new_object ();
 +          json_object_pim_ifp_add (json_row, ifp);
 +          json_object_int_add (json_row, "helloRx", pim_ifp->pim_ifstat_hello_recv);
 +          json_object_int_add (json_row, "helloTx", pim_ifp->pim_ifstat_hello_sent);
 +          json_object_int_add (json_row, "joinRx", pim_ifp->pim_ifstat_join_recv);
 +          json_object_int_add (json_row, "joinTx", pim_ifp->pim_ifstat_join_send);
 +          json_object_int_add (json_row, "registerRx", pim_ifp->pim_ifstat_reg_recv);
 +          json_object_int_add (json_row, "registerTx", pim_ifp->pim_ifstat_reg_recv);
 +          json_object_int_add (json_row, "registerStopRx", pim_ifp->pim_ifstat_reg_stop_recv);
 +          json_object_int_add (json_row, "registerStopTx", pim_ifp->pim_ifstat_reg_stop_send);
 +          json_object_int_add (json_row, "assertRx", pim_ifp->pim_ifstat_assert_recv);
 +          json_object_int_add (json_row, "assertTx", pim_ifp->pim_ifstat_assert_send);
 +
 +          json_object_object_add (json, ifp->name, json_row);
 +        }
 +      else
 +        {
 +          vty_out (vty,
 +               "%-10s %8u/%-8u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %s",
 +               ifp->name, pim_ifp->pim_ifstat_hello_recv,
 +               pim_ifp->pim_ifstat_hello_sent, pim_ifp->pim_ifstat_join_recv,
 +               pim_ifp->pim_ifstat_join_send, pim_ifp->pim_ifstat_prune_recv,
 +               pim_ifp->pim_ifstat_prune_send, pim_ifp->pim_ifstat_reg_recv,
 +               pim_ifp->pim_ifstat_reg_send,
 +               pim_ifp->pim_ifstat_reg_stop_recv,
 +               pim_ifp->pim_ifstat_reg_stop_send,
 +               pim_ifp->pim_ifstat_assert_recv,
 +               pim_ifp->pim_ifstat_assert_send, VTY_NEWLINE);
 +        }
 +    }
 +  if (uj)
 +    {
 +      vty_out (vty, "%s%s", json_object_to_json_string_ext (json, JSON_C_TO_STRING_PRETTY), VTY_NEWLINE);
 +      json_object_free (json);
 +    }
 +}
 +
 +static void pim_show_interface_traffic_single (struct vty *vty, const char *ifname, u_char uj)
 +{
 +  struct interface *ifp = NULL;
 +  struct pim_interface *pim_ifp = NULL;
 +  struct listnode *node = NULL;
 +  json_object *json = NULL;
 +  json_object *json_row = NULL;
 +  uint8_t found_ifname = 0;
 +
 +  if (uj)
 +    json = json_object_new_object ();
 +  else
 +    {
 +      vty_out (vty, "%s", VTY_NEWLINE);
 +      vty_out (vty, "%-12s%-17s%-17s%-17s%-17s%-17s%-17s%s", "Interface",
 +               "    HELLO", "    JOIN", "   PRUNE", "   REGISTER",
 +               "  REGISTER-STOP", "  ASSERT", VTY_NEWLINE);
 +      vty_out (vty,
 +               "%-10s%-18s%-17s%-17s%-17s%-17s%-17s%s",
 +               "", "      Rx/Tx", "     Rx/Tx", "    Rx/Tx", "    Rx/Tx",
 +               "     Rx/Tx", "    Rx/Tx", VTY_NEWLINE);
 +      vty_out (vty,
 +           "---------------------------------------------------------------------------------------------------------------%s",
 +           VTY_NEWLINE);
 +    }
 +
 +  for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp))
 +    {
 +      if (strcmp (ifname, ifp->name))
 +        continue;
 +
 +      pim_ifp = ifp->info;
 +
 +      if (!pim_ifp)
 +        continue;
 +
 +      if (pim_ifp->pim_sock_fd < 0)
 +        continue;
 +
 +      found_ifname = 1;
 +      if (uj)
 +        {
 +          json_row = json_object_new_object ();
 +          json_object_pim_ifp_add (json_row, ifp);
 +          json_object_int_add (json_row, "helloRx", pim_ifp->pim_ifstat_hello_recv);
 +          json_object_int_add (json_row, "helloTx", pim_ifp->pim_ifstat_hello_sent);
 +          json_object_int_add (json_row, "joinRx", pim_ifp->pim_ifstat_join_recv);
 +          json_object_int_add (json_row, "joinTx", pim_ifp->pim_ifstat_join_send);
 +          json_object_int_add (json_row, "registerRx", pim_ifp->pim_ifstat_reg_recv);
 +          json_object_int_add (json_row, "registerTx", pim_ifp->pim_ifstat_reg_recv);
 +          json_object_int_add (json_row, "registerStopRx", pim_ifp->pim_ifstat_reg_stop_recv);
 +          json_object_int_add (json_row, "registerStopTx", pim_ifp->pim_ifstat_reg_stop_send);
 +          json_object_int_add (json_row, "assertRx", pim_ifp->pim_ifstat_assert_recv);
 +          json_object_int_add (json_row, "assertTx", pim_ifp->pim_ifstat_assert_send);
 +
 +          json_object_object_add (json, ifp->name, json_row);
 +        }
 +      else
 +        {
 +          vty_out (vty,
 +               "%-10s %8u/%-8u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %7u/%-7u %s",
 +               ifp->name, pim_ifp->pim_ifstat_hello_recv,
 +               pim_ifp->pim_ifstat_hello_sent, pim_ifp->pim_ifstat_join_recv,
 +               pim_ifp->pim_ifstat_join_send, pim_ifp->pim_ifstat_prune_recv,
 +               pim_ifp->pim_ifstat_prune_send, pim_ifp->pim_ifstat_reg_recv,
 +               pim_ifp->pim_ifstat_reg_send,
 +               pim_ifp->pim_ifstat_reg_stop_recv,
 +               pim_ifp->pim_ifstat_reg_stop_send,
 +               pim_ifp->pim_ifstat_assert_recv,
 +               pim_ifp->pim_ifstat_assert_send, VTY_NEWLINE);
 +        }
 +    }
 +  if (uj)
 +    {
 +      vty_out (vty, "%s%s", json_object_to_json_string_ext (json, JSON_C_TO_STRING_PRETTY), VTY_NEWLINE);
 +      json_object_free (json);
 +    }
 +  else
 +    {
 +      if (!found_ifname)
 +        vty_out (vty, "%% No such interface%s", VTY_NEWLINE);
 +    }
 +}
 +
  static void pim_show_join(struct vty *vty, u_char uj)
  {
    struct pim_interface *pim_ifp;
@@@ -1780,9 -1617,13 +1780,9 @@@ static void pim_show_neighbors_secondar
                     neigh_src_str, sizeof(neigh_src_str));
  
        for (ALL_LIST_ELEMENTS_RO(neigh->prefix_list, prefix_node, p)) {
 -      char neigh_sec_str[INET_ADDRSTRLEN];
 -
 -      if (p->family != AF_INET)
 -        continue;
 +      char neigh_sec_str[PREFIX2STR_BUFFER];
  
 -      pim_inet4_dump("<src?>", p->u.prefix4,
 -                     neigh_sec_str, sizeof(neigh_sec_str));
 +      prefix2str(p, neigh_sec_str, sizeof(neigh_sec_str));
  
        vty_out(vty, "%-9s %-15s %-15s %-15s%s",
                ifp->name,
@@@ -2653,45 -2494,6 +2653,45 @@@ DEFUN (clear_ip_pim_interfaces
    return CMD_SUCCESS;
  }
  
 +DEFUN (clear_ip_pim_interface_traffic,
 +       clear_ip_pim_interface_traffic_cmd,
 +       "clear ip pim interface traffic",
 +       "Reset functions\n"
 +       "IP information\n"
 +       "PIM clear commands\n"
 +       "Reset PIM interfaces\n"
 +       "Reset Protocol Packet counters\n")
 +{
 +  struct listnode  *ifnode = NULL;
 +  struct listnode  *ifnextnode = NULL;
 +  struct interface *ifp = NULL;
 +  struct pim_interface *pim_ifp = NULL;
 +
 +  for (ALL_LIST_ELEMENTS (vrf_iflist (VRF_DEFAULT), ifnode, ifnextnode, ifp))
 +    {
 +      pim_ifp = ifp->info;
 +
 +      if (!pim_ifp)
 +        continue;
 +
 +      pim_ifp->pim_ifstat_hello_recv = 0;
 +      pim_ifp->pim_ifstat_hello_sent = 0;
 +      pim_ifp->pim_ifstat_join_recv = 0;
 +      pim_ifp->pim_ifstat_join_send = 0;
 +      pim_ifp->pim_ifstat_prune_recv = 0;
 +      pim_ifp->pim_ifstat_prune_send = 0;
 +      pim_ifp->pim_ifstat_reg_recv = 0;
 +      pim_ifp->pim_ifstat_reg_send = 0;
 +      pim_ifp->pim_ifstat_reg_stop_recv = 0;
 +      pim_ifp->pim_ifstat_reg_stop_send = 0;
 +      pim_ifp->pim_ifstat_assert_recv = 0;
 +      pim_ifp->pim_ifstat_assert_send = 0;
 +
 +    }
 +
 +  return CMD_SUCCESS;
 +}
 +
  DEFUN (clear_ip_pim_oil,
         clear_ip_pim_oil_cmd,
         "clear ip pim oil",
@@@ -3078,7 -2880,7 +3078,7 @@@ DEFUN (show_ip_pim_nexthop_lookup
    char nexthop_addr_str[PREFIX_STRLEN];
    char grp_str[PREFIX_STRLEN];
  
 -  addr_str = (const char *)argv[0];
 +  addr_str = argv[4]->arg;
    result = inet_pton (AF_INET, addr_str, &src_addr);
    if (result <= 0)
      {
        return CMD_WARNING;
      }
  
 -  addr_str1 = (const char *)argv[1];
 +  addr_str1 = argv[5]->arg;
    result = inet_pton (AF_INET, addr_str1, &grp_addr);
    if (result <= 0)
      {
    return CMD_SUCCESS;
  }
  
 +DEFUN (show_ip_pim_interface_traffic,
 +       show_ip_pim_interface_traffic_cmd,
 +       "show ip pim interface traffic [WORD] [json]",
 +       SHOW_STR
 +       IP_STR
 +       PIM_STR
 +       "PIM interface information\n"
 +       "Protocol Packet counters\n"
 +       "Interface name\n"
 +       "JavaScript Object Notation\n")
 +{
 +  u_char uj = use_json (argc, argv);
 +  int idx = 0;
 +
 +  if (argv_find(argv, argc, "WORD", &idx))
 +    pim_show_interface_traffic_single (vty, argv[idx]->arg, uj);
 +  else
 +    pim_show_interface_traffic (vty, uj);
 +
 +  return CMD_SUCCESS;
 +}
 +
  static void show_multicast_interfaces(struct vty *vty)
  {
    struct listnode  *node;
@@@ -3494,7 -3274,7 +3494,7 @@@ static void show_mroute(struct vty *vty
          json_object_string_add(json_ifp_out, "group", grp_str);
          json_object_boolean_true_add(json_ifp_out, "protocolStatic");
          json_object_string_add(json_ifp_out, "inboundInterface", in_ifname);
-         json_object_int_add(json_ifp_out, "iVifI", c_oil->oil.mfcc_parent);
+         json_object_int_add(json_ifp_out, "iVifI", s_route->c_oil.oil.mfcc_parent);
          json_object_string_add(json_ifp_out, "outboundInterface", out_ifname);
          json_object_int_add(json_ifp_out, "oVifI", oif_vif_index);
          json_object_int_add(json_ifp_out, "ttl", ttl);
@@@ -3955,31 -3735,6 +3955,31 @@@ DEFUN (no_ip_pim_packets
    return CMD_SUCCESS;
  }
  
 +DEFUN (ip_pim_v6_secondary,
 +       ip_pim_v6_secondary_cmd,
 +       "ip pim send-v6-secondary",
 +       IP_STR
 +       "pim multicast routing\n"
 +       "Send v6 secondary addresses\n")
 +{
 +  pimg->send_v6_secondary = 1;
 +
 +  return CMD_SUCCESS;
 +}
 +
 +DEFUN (no_ip_pim_v6_secondary,
 +       no_ip_pim_v6_secondary_cmd,
 +       "no ip pim send-v6-secondary",
 +       NO_STR
 +       IP_STR
 +       "pim multicast routing\n"
 +       "Send v6 secondary addresses\n")
 +{
 +  pimg->send_v6_secondary = 0;
 +
 +  return CMD_SUCCESS;
 +}
 +
  DEFUN (ip_pim_rp,
         ip_pim_rp_cmd,
         "ip pim rp A.B.C.D [A.B.C.D/M]",
@@@ -4048,12 -3803,12 +4048,12 @@@ DEFUN (no_ip_pim_rp
         "ip address of RP\n"
         "Group Address range to cover\n")
  {
 -  int idx_ipv4 = 4;
 +  int idx_ipv4 = 4, idx_group = 0;
  
 -  if (argc == (idx_ipv4 + 1))
 -    return pim_no_rp_cmd_worker (vty, argv[idx_ipv4]->arg, NULL, NULL);
 +  if (argv_find (argv, argc, "A.B.C.D/M", &idx_group))
 +    return pim_no_rp_cmd_worker (vty, argv[idx_ipv4]->arg, argv[idx_group]->arg, NULL);
    else
 -    return pim_no_rp_cmd_worker (vty, argv[idx_ipv4]->arg, argv[idx_ipv4 + 1]->arg, NULL);
 +    return pim_no_rp_cmd_worker (vty, argv[idx_ipv4]->arg, NULL, NULL);
  }
  
  DEFUN (no_ip_pim_rp_prefix_list,
@@@ -6702,16 -6457,13 +6702,16 @@@ DEFUN (show_ip_msdp_sa_sg
         "JavaScript Object Notation\n")
  {
    u_char uj = use_json(argc, argv);
 -  if (uj)
 -    argc--;
  
 -  if (argc == 6)
 -    ip_msdp_show_sa_sg(vty, argv[4]->arg, argv[5]->arg, uj);
 -  else if (argc == 5)
 -    ip_msdp_show_sa_addr(vty, argv[4]->arg, uj);
 +  int idx = 0;
 +  char *src_ip = argv_find (argv, argc, "A.B.C.D", &idx) ? argv[idx++]->arg : NULL;
 +  char *grp_ip = idx < argc && argv_find (argv, argc, "A.B.C.D", &idx) ?
 +                 argv[idx]->arg : NULL;
 +
 +  if (src_ip && grp_ip)
 +    ip_msdp_show_sa_sg(vty, src_ip, grp_ip, uj);
 +  else if (src_ip)
 +    ip_msdp_show_sa_addr(vty, src_ip, uj);
    else
      ip_msdp_show_sa(vty, uj);
  
@@@ -6747,8 -6499,6 +6747,8 @@@ void pim_cmd_init(
    install_element (CONFIG_NODE, &no_ip_pim_keep_alive_cmd);
    install_element (CONFIG_NODE, &ip_pim_packets_cmd);
    install_element (CONFIG_NODE, &no_ip_pim_packets_cmd);
 +  install_element (CONFIG_NODE, &ip_pim_v6_secondary_cmd);
 +  install_element (CONFIG_NODE, &no_ip_pim_v6_secondary_cmd);
    install_element (CONFIG_NODE, &ip_ssmpingd_cmd);
    install_element (CONFIG_NODE, &no_ip_ssmpingd_cmd); 
    install_element (CONFIG_NODE, &ip_msdp_peer_cmd);
    install_element (VIEW_NODE, &show_ip_pim_assert_internal_cmd);
    install_element (VIEW_NODE, &show_ip_pim_assert_metric_cmd);
    install_element (VIEW_NODE, &show_ip_pim_assert_winner_metric_cmd);
 +  install_element (VIEW_NODE, &show_ip_pim_interface_traffic_cmd);
    install_element (VIEW_NODE, &show_ip_pim_interface_cmd);
    install_element (VIEW_NODE, &show_ip_pim_join_cmd);
    install_element (VIEW_NODE, &show_ip_pim_local_membership_cmd);
    install_element (ENABLE_NODE, &clear_ip_igmp_interfaces_cmd);
    install_element (ENABLE_NODE, &clear_ip_mroute_cmd);
    install_element (ENABLE_NODE, &clear_ip_pim_interfaces_cmd);
 +  install_element (ENABLE_NODE, &clear_ip_pim_interface_traffic_cmd);
    install_element (ENABLE_NODE, &clear_ip_pim_oil_cmd);
  
    install_element (ENABLE_NODE, &debug_igmp_cmd);