summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pimd/pim_register.c2
-rw-r--r--pimd/pim_upstream.c28
-rw-r--r--pimd/pim_upstream.h1
3 files changed, 5 insertions, 26 deletions
diff --git a/pimd/pim_register.c b/pimd/pim_register.c
index 99ddd45d7f..46d8e3ec2e 100644
--- a/pimd/pim_register.c
+++ b/pimd/pim_register.c
@@ -358,7 +358,7 @@ pim_register_recv (struct interface *ifp,
upstream->sg.src = sg.src;
upstream->rpf.rpf_addr = upstream->rpf.source_nexthop.mrib_nexthop_addr;
- upstream->join_state = PIM_UPSTREAM_PRUNE;
+ upstream->join_state = PIM_UPSTREAM_NOTJOINED;
}
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c
index 5324d555ec..19f7d3336c 100644
--- a/pimd/pim_upstream.c
+++ b/pimd/pim_upstream.c
@@ -473,26 +473,9 @@ pim_upstream_switch(struct pim_upstream *up,
pim_upstream_state2str (new_state));
}
- /*
- * This code still needs work.
- */
- switch (up->join_state)
- {
- case PIM_UPSTREAM_PRUNE:
- if (!PIM_UPSTREAM_FLAG_TEST_FHR(up->flags))
- {
- up->join_state = new_state;
- up->state_transition = pim_time_monotonic_sec ();
- }
- break;
- case PIM_UPSTREAM_NOTJOINED:
- case PIM_UPSTREAM_JOINED:
- up->join_state = new_state;
- if (old_state != new_state)
- up->state_transition = pim_time_monotonic_sec();
-
- break;
- }
+ up->join_state = new_state;
+ if (old_state != new_state)
+ up->state_transition = pim_time_monotonic_sec();
pim_upstream_update_assert_tracking_desired(up);
@@ -600,7 +583,7 @@ pim_upstream_new (struct prefix_sg *sg,
up->t_ka_timer = NULL;
up->t_rs_timer = NULL;
up->t_msdp_reg_timer = NULL;
- up->join_state = 0;
+ up->join_state = PIM_UPSTREAM_NOTJOINED;
up->reg_state = PIM_REG_NOINFO;
up->state_transition = pim_time_monotonic_sec();
up->channel_oil = NULL;
@@ -1201,9 +1184,6 @@ pim_upstream_state2str (enum pim_upstream_state join_state)
case PIM_UPSTREAM_JOINED:
return "Joined";
break;
- case PIM_UPSTREAM_PRUNE:
- return "Prune";
- break;
}
return "Unknown";
}
diff --git a/pimd/pim_upstream.h b/pimd/pim_upstream.h
index cd7c16be75..b191fe9404 100644
--- a/pimd/pim_upstream.h
+++ b/pimd/pim_upstream.h
@@ -61,7 +61,6 @@
enum pim_upstream_state {
PIM_UPSTREAM_NOTJOINED,
PIM_UPSTREAM_JOINED,
- PIM_UPSTREAM_PRUNE,
};
enum pim_reg_state {