summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_interface.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2021-05-04 10:24:45 -0400
committerGitHub <noreply@github.com>2021-05-04 10:24:45 -0400
commitbe7916a03245d7a81457111e397bedded3133494 (patch)
tree51467412c0e82372bbc9db4b6bfad86f982ef825 /ospf6d/ospf6_interface.c
parent7e4085ca986e9a1fcb8ed4505487b7312f617c3e (diff)
parent17ab36c6c4a48588b86b53a0d3670dd340517814 (diff)
Merge pull request #8504 from ranjanyash54/link_lsa_priority
ospf6d: Send Link LSAs when interface priority is changed
Diffstat (limited to 'ospf6d/ospf6_interface.c')
-rw-r--r--ospf6d/ospf6_interface.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index f3af8b308f..a2ddba65e9 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -474,8 +474,8 @@ void ospf6_interface_connected_route_update(struct interface *ifp)
OSPF6_INTRA_PREFIX_LSA_SCHEDULE_STUB(oi->area);
}
-static void ospf6_interface_state_change(uint8_t next_state,
- struct ospf6_interface *oi)
+static int ospf6_interface_state_change(uint8_t next_state,
+ struct ospf6_interface *oi)
{
uint8_t prev_state;
struct ospf6 *ospf6;
@@ -484,7 +484,7 @@ static void ospf6_interface_state_change(uint8_t next_state,
oi->state = next_state;
if (prev_state == next_state)
- return;
+ return -1;
/* log */
if (IS_OSPF6_DEBUG_INTERFACE) {
@@ -525,6 +525,8 @@ static void ospf6_interface_state_change(uint8_t next_state,
}
hook_call(ospf6_interface_change, oi, next_state, prev_state);
+
+ return 0;
}
@@ -1902,10 +1904,13 @@ DEFUN (ipv6_ospf6_priority,
? OSPF6_INTERFACE_PRIORITY
: strtoul(argv[idx_number]->arg, NULL, 10);
- if (oi->area && (oi->state == OSPF6_INTERFACE_DROTHER
- || oi->state == OSPF6_INTERFACE_BDR
- || oi->state == OSPF6_INTERFACE_DR))
- ospf6_interface_state_change(dr_election(oi), oi);
+ if (oi->area
+ && (oi->state == OSPF6_INTERFACE_DROTHER
+ || oi->state == OSPF6_INTERFACE_BDR
+ || oi->state == OSPF6_INTERFACE_DR)) {
+ if (ospf6_interface_state_change(dr_election(oi), oi) == -1)
+ OSPF6_LINK_LSA_SCHEDULE(oi);
+ }
return CMD_SUCCESS;
}