]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #4096 from donaldsharp/pim_nht_cleanup
authorRuss White <russ@riw.us>
Tue, 16 Apr 2019 14:27:35 +0000 (10:27 -0400)
committerGitHub <noreply@github.com>
Tue, 16 Apr 2019 14:27:35 +0000 (10:27 -0400)
Pim nht cleanup

1  2 
pimd/pim_cmd.c
pimd/pim_upstream.c

diff --combined pimd/pim_cmd.c
index afeda723e26651ce2cfe3ff221a308b95f3885e4,8d0ea12b8cfc0bdff5d929cb5ad61cb3eac54892..2d5acb87a91b5fc9814659a7f2406812431c2b70
@@@ -4257,7 -4257,6 +4257,6 @@@ DEFUN (show_ip_pim_nexthop_lookup
         "Source/RP address\n"
         "Multicast Group address\n")
  {
-       struct pim_nexthop_cache *pnc = NULL;
        struct prefix nht_p;
        int result = 0;
        struct in_addr src_addr, grp_addr;
        char grp_str[PREFIX_STRLEN];
        int idx = 2;
        struct vrf *vrf = pim_cmd_lookup_vrf(vty, argv, argc, &idx);
-       struct pim_rpf rpf;
  
        if (!vrf)
                return CMD_WARNING;
        grp.u.prefix4 = grp_addr;
        memset(&nexthop, 0, sizeof(nexthop));
  
-       memset(&rpf, 0, sizeof(struct pim_rpf));
-       rpf.rpf_addr.family = AF_INET;
-       rpf.rpf_addr.prefixlen = IPV4_MAX_BITLEN;
-       rpf.rpf_addr.u.prefix4 = vif_source;
-       pnc = pim_nexthop_cache_find(vrf->info, &rpf);
-       if (pnc)
-               result = pim_ecmp_nexthop_search(vrf->info, pnc, &nexthop,
-                                                &nht_p, &grp, 0);
-       else
-               result = pim_ecmp_nexthop_lookup(vrf->info, &nexthop, &nht_p,
-                                                &grp, 0);
+       result = pim_ecmp_nexthop_lookup(vrf->info, &nexthop, &nht_p, &grp, 0);
  
        if (!result) {
                vty_out(vty,
@@@ -7068,23 -7055,21 +7055,23 @@@ DEFUN (no_debug_mroute_detail
        return CMD_SUCCESS;
  }
  
 -DEFUN (debug_static,
 -       debug_static_cmd,
 -       "debug static",
 +DEFUN (debug_pim_static,
 +       debug_pim_static_cmd,
 +       "debug pim static",
         DEBUG_STR
 +       DEBUG_PIM_STR
         DEBUG_STATIC_STR)
  {
        PIM_DO_DEBUG_STATIC;
        return CMD_SUCCESS;
  }
  
 -DEFUN (no_debug_static,
 -       no_debug_static_cmd,
 -       "no debug static",
 +DEFUN (no_debug_pim_static,
 +       no_debug_pim_static_cmd,
 +       "no debug pim static",
         NO_STR
         DEBUG_STR
 +       DEBUG_PIM_STR
         DEBUG_STATIC_STR)
  {
        PIM_DONT_DEBUG_STATIC;
@@@ -8869,8 -8854,8 +8856,8 @@@ void pim_cmd_init(void
        install_element(ENABLE_NODE, &debug_mroute_detail_cmd);
        install_element(ENABLE_NODE, &no_debug_mroute_cmd);
        install_element(ENABLE_NODE, &no_debug_mroute_detail_cmd);
 -      install_element(ENABLE_NODE, &debug_static_cmd);
 -      install_element(ENABLE_NODE, &no_debug_static_cmd);
 +      install_element(ENABLE_NODE, &debug_pim_static_cmd);
 +      install_element(ENABLE_NODE, &no_debug_pim_static_cmd);
        install_element(ENABLE_NODE, &debug_pim_cmd);
        install_element(ENABLE_NODE, &no_debug_pim_cmd);
        install_element(ENABLE_NODE, &debug_pim_nht_cmd);
        install_element(CONFIG_NODE, &debug_mroute_detail_cmd);
        install_element(CONFIG_NODE, &no_debug_mroute_cmd);
        install_element(CONFIG_NODE, &no_debug_mroute_detail_cmd);
 -      install_element(CONFIG_NODE, &debug_static_cmd);
 -      install_element(CONFIG_NODE, &no_debug_static_cmd);
 +      install_element(CONFIG_NODE, &debug_pim_static_cmd);
 +      install_element(CONFIG_NODE, &no_debug_pim_static_cmd);
        install_element(CONFIG_NODE, &debug_pim_cmd);
        install_element(CONFIG_NODE, &no_debug_pim_cmd);
        install_element(CONFIG_NODE, &debug_pim_nht_cmd);
diff --combined pimd/pim_upstream.c
index f1347b7eafeaf5a344502efa00ab079635b35216,8c59207246a6d1d2957f3e62fe92d3a1154f8e12..04137b0b78cd311c704f0176aef55c9cbfafb03b
@@@ -1276,12 -1276,7 +1276,12 @@@ void pim_upstream_set_sptbit(struct pim
        }
  
        // AND JoinDesired(S,G) == TRUE
 -      // FIXME
 +      if (!pim_upstream_evaluate_join_desired(up->channel_oil->pim, up)) {
 +              if (PIM_DEBUG_TRACE)
 +                      zlog_debug("%s: %s Join is not Desired",
 +                                 __PRETTY_FUNCTION__, up->sg_str);
 +              return;
 +      }
  
        // DirectlyConnected(S) == TRUE
        if (pim_if_connected_to_source(up->rpf.source_nexthop.interface,
        if (!starup
            || up->rpf.source_nexthop
                               .interface != starup->rpf.source_nexthop.interface) {
+               struct pim_upstream *starup = up->parent;
                if (PIM_DEBUG_TRACE)
                        zlog_debug(
                                "%s: %s RPF_interface(S) != RPF_interface(RP(G))",
                                __PRETTY_FUNCTION__, up->sg_str);
                up->sptbit = PIM_UPSTREAM_SPTBIT_TRUE;
+               pim_jp_agg_single_upstream_send(&starup->rpf, starup, true);
                return;
        }