summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_message.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-07-05 15:28:50 +0200
committerDonald Sharp <sharpd@nvidia.com>2023-07-12 23:56:29 +0200
commit0cbd5855a97197f62b04a5b90ac79d78725511cb (patch)
tree545b3f60c52bf3ca8fa45b8b305736d1b30278ce /ospf6d/ospf6_message.c
parentMerge pull request #13977 from anlancs/fix/mgmt-bool-change (diff)
downloadfrr-0cbd5855a97197f62b04a5b90ac79d78725511cb.tar.xz
frr-0cbd5855a97197f62b04a5b90ac79d78725511cb.zip
ospf6d: Convert ospf6_lsa_unlock to a better api
Make the ospf6_lsa_unlock take the same parameters that the ospf_lsa_unlock does to make it consistent and to also ensure that no-one can make the mistake of getting the pointer cleared up. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospf6d/ospf6_message.c')
-rw-r--r--ospf6d/ospf6_message.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c
index cc00604f0..e9b19ea0a 100644
--- a/ospf6d/ospf6_message.c
+++ b/ospf6d/ospf6_message.c
@@ -2335,9 +2335,9 @@ static uint16_t ospf6_make_dbdesc(struct ospf6_neighbor *on, struct stream *s)
if ((length + sizeof(struct ospf6_lsa_header)
+ OSPF6_HEADER_SIZE)
> ospf6_packet_max(on->ospf6_if)) {
- ospf6_lsa_unlock(lsa);
+ ospf6_lsa_unlock(&lsa);
if (lsanext)
- ospf6_lsa_unlock(lsanext);
+ ospf6_lsa_unlock(&lsanext);
break;
}
stream_put(s, lsa->header,
@@ -2415,9 +2415,9 @@ void ospf6_dbdesc_send_newone(struct event *thread)
if (size + sizeof(struct ospf6_lsa_header)
> ospf6_packet_max(on->ospf6_if)) {
- ospf6_lsa_unlock(lsa);
+ ospf6_lsa_unlock(&lsa);
if (lsanext)
- ospf6_lsa_unlock(lsanext);
+ ospf6_lsa_unlock(&lsanext);
break;
}
@@ -2447,9 +2447,9 @@ static uint16_t ospf6_make_lsreq(struct ospf6_neighbor *on, struct stream *s)
for (ALL_LSDB(on->request_list, lsa, lsanext)) {
if ((length + OSPF6_HEADER_SIZE)
> ospf6_packet_max(on->ospf6_if)) {
- ospf6_lsa_unlock(lsa);
+ ospf6_lsa_unlock(&lsa);
if (lsanext)
- ospf6_lsa_unlock(lsanext);
+ ospf6_lsa_unlock(&lsanext);
break;
}
stream_putw(s, 0); /* reserved */
@@ -2462,7 +2462,7 @@ static uint16_t ospf6_make_lsreq(struct ospf6_neighbor *on, struct stream *s)
if (last_req != NULL) {
if (on->last_ls_req != NULL)
- on->last_ls_req = ospf6_lsa_unlock(on->last_ls_req);
+ ospf6_lsa_unlock(&on->last_ls_req);
ospf6_lsa_lock(last_req);
on->last_ls_req = last_req;
@@ -2944,9 +2944,9 @@ static uint16_t ospf6_make_lsack_interface(struct ospf6_interface *oi,
event_add_event(master, ospf6_lsack_send_interface, oi,
0, &oi->thread_send_lsack);
- ospf6_lsa_unlock(lsa);
+ ospf6_lsa_unlock(&lsa);
if (lsanext)
- ospf6_lsa_unlock(lsanext);
+ ospf6_lsa_unlock(&lsanext);
break;
}
ospf6_lsa_age_update_to_send(lsa, oi->transdelay);