summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2019-09-18 15:42:06 -0400
committerGitHub <noreply@github.com>2019-09-18 15:42:06 -0400
commit5d9a2c67a4857563d080e085f285a701b65cb120 (patch)
tree561cb1604ebcbe41598be9b6521523c396b9fa3f /lib/if.c
parent0a0d4f9e2e8bdf9d378c1c07a60e11f8a1bb7cec (diff)
parent6f4e5eddc0a5ce84fd0546bb8cb21c7530ff0693 (diff)
Merge pull request #5008 from opensourcerouting/nb-improvements
northbound fixes and enhancements
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/if.c b/lib/if.c
index 5f92327562..a3e6313667 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -207,21 +207,18 @@ void if_update_to_new_vrf(struct interface *ifp, vrf_id_t vrf_id)
if (yang_module_find("frr-interface")) {
struct lyd_node *if_dnode;
- pthread_rwlock_wrlock(&running_config->lock);
- {
- if_dnode = yang_dnode_get(
- running_config->dnode,
- "/frr-interface:lib/interface[name='%s'][vrf='%s']/vrf",
- ifp->name, old_vrf->name);
- if (if_dnode) {
- yang_dnode_change_leaf(if_dnode, vrf->name);
- running_config->version++;
- }
+ if_dnode = yang_dnode_get(
+ running_config->dnode,
+ "/frr-interface:lib/interface[name='%s'][vrf='%s']/vrf",
+ ifp->name, old_vrf->name);
+ if (if_dnode) {
+ yang_dnode_change_leaf(if_dnode, vrf->name);
+ running_config->version++;
}
- pthread_rwlock_unlock(&running_config->lock);
}
}
+
/* Delete interface structure. */
void if_delete_retain(struct interface *ifp)
{