diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-08-14 14:16:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-14 14:16:10 +0200 |
commit | d6853655b597e041b24a2b8d9367eea04d666c69 (patch) | |
tree | bcaf438322b7934b1a1a77f0800271a1b77f4b0b /pimd | |
parent | bgpd/ospf(6)d/pimd: hide BFD commands with timers (diff) | |
parent | Merge pull request #2823 from opensourcerouting/snap-staticd (diff) | |
download | frr-d6853655b597e041b24a2b8d9367eea04d666c69.tar.xz frr-d6853655b597e041b24a2b8d9367eea04d666c69.zip |
Merge branch 'master' into bfd-final
Diffstat (limited to 'pimd')
-rw-r--r-- | pimd/pim_br.c | 1 | ||||
-rw-r--r-- | pimd/pim_cmd.c | 5 | ||||
-rw-r--r-- | pimd/pim_igmpv3.c | 31 | ||||
-rw-r--r-- | pimd/pim_rp.c | 17 | ||||
-rw-r--r-- | pimd/pim_vty.c | 5 | ||||
-rw-r--r-- | pimd/pimd.h | 1 |
6 files changed, 5 insertions, 55 deletions
diff --git a/pimd/pim_br.c b/pimd/pim_br.c index 6184ea12c..fc6a02ec9 100644 --- a/pimd/pim_br.c +++ b/pimd/pim_br.c @@ -64,7 +64,6 @@ void pim_br_set_pmbr(struct prefix_sg *sg, struct in_addr br) if (!pim_br) { pim_br = XCALLOC(MTYPE_PIM_BR, sizeof(*pim_br)); - pim_br->sg = *sg; listnode_add(pim_br_list, pim_br); diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 0d6413919..6eb4303fb 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -5106,11 +5106,6 @@ static int pim_rp_cmd_worker(struct pim_instance *pim, struct vty *vty, result = pim_rp_new(pim, rp, group, plist); - if (result == PIM_MALLOC_FAIL) { - vty_out(vty, "%% Out of memory\n"); - return CMD_WARNING_CONFIG_FAILED; - } - if (result == PIM_GROUP_BAD_ADDRESS) { vty_out(vty, "%% Bad group address specified: %s\n", group); return CMD_WARNING_CONFIG_FAILED; diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c index b32d71cc0..132fe4d56 100644 --- a/pimd/pim_igmpv3.c +++ b/pimd/pim_igmpv3.c @@ -486,9 +486,6 @@ static struct igmp_source *add_source_by_addr(struct igmp_sock *igmp, } src = source_new(group, src_addr); - if (!src) { - return 0; - } return src; } @@ -579,10 +576,6 @@ static void isex_excl(struct igmp_group *group, int num_sources, /* E.4: if not found, create source with timer=GMI: * (A-X-Y) */ source = source_new(group, *src_addr); - if (!source) { - /* ugh, internal malloc failure, skip source */ - continue; - } zassert(!source->t_source_timer); /* timer == 0 */ igmp_source_reset_gmi(group->group_igmp_sock, group, source); @@ -637,10 +630,6 @@ static void isex_incl(struct igmp_group *group, int num_sources, /* I.4: if not found, create source with timer=0 (B-A) */ source = source_new(group, *src_addr); - if (!source) { - /* ugh, internal malloc failure, skip source */ - continue; - } zassert(!source->t_source_timer); /* (B-A) timer=0 */ } @@ -720,10 +709,6 @@ static void toin_incl(struct igmp_group *group, int num_sources, } else { /* If not found, create new source */ source = source_new(group, *src_addr); - if (!source) { - /* ugh, internal malloc failure, skip source */ - continue; - } } /* (B)=GMI */ @@ -765,10 +750,6 @@ static void toin_excl(struct igmp_group *group, int num_sources, } else { /* If not found, create new source */ source = source_new(group, *src_addr); - if (!source) { - /* ugh, internal malloc failure, skip source */ - continue; - } } /* (A)=GMI */ @@ -854,10 +835,6 @@ static void toex_incl(struct igmp_group *group, int num_sources, /* If source not found, create source with timer=0: * (B-A)=0 */ source = source_new(group, *src_addr); - if (!source) { - /* ugh, internal malloc failure, skip source */ - continue; - } zassert(!source->t_source_timer); /* (B-A) timer=0 */ } @@ -917,10 +894,6 @@ static void toex_excl(struct igmp_group *group, int num_sources, * (A-X-Y)=Group Timer */ long group_timer_msec; source = source_new(group, *src_addr); - if (!source) { - /* ugh, internal malloc failure, skip source */ - continue; - } zassert(!source->t_source_timer); /* timer == 0 */ group_timer_msec = igmp_group_timer_remain_msec(group); @@ -1431,10 +1404,6 @@ static void block_excl(struct igmp_group *group, int num_sources, * (A-X-Y)=Group Timer */ long group_timer_msec; source = source_new(group, *src_addr); - if (!source) { - /* ugh, internal malloc failure, skip source */ - continue; - } zassert(!source->t_source_timer); /* timer == 0 */ group_timer_msec = igmp_group_timer_remain_msec(group); diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index 783f93175..3b3e5eb69 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -102,19 +102,10 @@ void pim_rp_init(struct pim_instance *pim) struct route_node *rn; pim->rp_list = list_new(); - if (!pim->rp_list) { - zlog_err("Unable to alloc rp_list"); - return; - } pim->rp_list->del = (void (*)(void *))pim_rp_info_free; pim->rp_list->cmp = pim_rp_list_cmp; pim->rp_table = route_table_init(); - if (!pim->rp_table) { - zlog_err("Unable to alloc rp_table"); - list_delete_and_null(&pim->rp_list); - return; - } rp_info = XCALLOC(MTYPE_PIM_RP, sizeof(*rp_info)); @@ -133,14 +124,6 @@ void pim_rp_init(struct pim_instance *pim) listnode_add(pim->rp_list, rp_info); rn = route_node_get(pim->rp_table, &rp_info->group); - if (!rn) { - zlog_err("Failure to get route node for pim->rp_table"); - list_delete_and_null(&pim->rp_list); - route_table_finish(pim->rp_table); - XFREE(MTYPE_PIM_RP, rp_info); - return; - } - rn->info = rp_info; if (PIM_DEBUG_TRACE) zlog_debug( diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c index f4d833c26..88be195be 100644 --- a/pimd/pim_vty.c +++ b/pimd/pim_vty.c @@ -258,6 +258,11 @@ int pim_interface_config_write(struct vty *vty) ifp->name, vrf->name); ++writes; + if (ifp->desc) { + vty_out(vty, " description %s\n", ifp->desc); + ++writes; + } + if (ifp->info) { struct pim_interface *pim_ifp = ifp->info; diff --git a/pimd/pimd.h b/pimd/pimd.h index 840e0d7e3..1b11dc3f7 100644 --- a/pimd/pimd.h +++ b/pimd/pimd.h @@ -117,7 +117,6 @@ /* PIM error codes */ #define PIM_SUCCESS 0 -#define PIM_MALLOC_FAIL -1 #define PIM_GROUP_BAD_ADDRESS -2 #define PIM_GROUP_OVERLAP -3 #define PIM_GROUP_PFXLIST_OVERLAP -4 |