mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 15:07:39 +00:00
Merge pull request #2743 from donaldsharp/bgp_null_stuff
Put back some removed Code
This commit is contained in:
commit
729fa7048b
@ -188,7 +188,7 @@ static void bgp_info_extra_free(struct bgp_info_extra **extra)
|
|||||||
struct bgp_info *bi = (struct bgp_info *)e->parent;
|
struct bgp_info *bi = (struct bgp_info *)e->parent;
|
||||||
|
|
||||||
if (bi->net)
|
if (bi->net)
|
||||||
bgp_unlock_node((struct bgp_node *)bi->net);
|
bi->net = bgp_unlock_node((struct bgp_node *)bi->net);
|
||||||
bgp_info_unlock(e->parent);
|
bgp_info_unlock(e->parent);
|
||||||
e->parent = NULL;
|
e->parent = NULL;
|
||||||
}
|
}
|
||||||
|
@ -128,9 +128,9 @@ static inline struct bgp_node *bgp_node_parent_nolock(struct bgp_node *node)
|
|||||||
/*
|
/*
|
||||||
* bgp_unlock_node
|
* bgp_unlock_node
|
||||||
*/
|
*/
|
||||||
static inline void bgp_unlock_node(struct bgp_node *node)
|
static inline struct bgp_node *bgp_unlock_node(struct bgp_node *node)
|
||||||
{
|
{
|
||||||
route_unlock_node(bgp_node_to_rnode(node));
|
return (struct bgp_node *)route_unlock_node(bgp_node_to_rnode(node));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -233,13 +233,17 @@ static inline struct route_node *route_lock_node(struct route_node *node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Unlock node. */
|
/* Unlock node. */
|
||||||
static inline void route_unlock_node(struct route_node *node)
|
static inline struct route_node *route_unlock_node(struct route_node *node)
|
||||||
{
|
{
|
||||||
assert(node->lock > 0);
|
assert(node->lock > 0);
|
||||||
(*(unsigned *)&node->lock)--;
|
(*(unsigned *)&node->lock)--;
|
||||||
|
|
||||||
if (node->lock == 0)
|
if (node->lock == 0) {
|
||||||
route_node_delete(node);
|
route_node_delete(node);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user