diff options
Diffstat (limited to 'lib/if.c')
| -rw-r--r-- | lib/if.c | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -262,7 +262,9 @@ void if_update_to_new_vrf(struct interface *ifp, vrf_id_t vrf_id) "/frr-interface:lib/interface[name='%s'][vrf='%s']/vrf", ifp->name, old_vrf->name); if (if_dnode) { + nb_running_unset_entry(if_dnode->parent); yang_dnode_change_leaf(if_dnode, vrf->name); + nb_running_set_entry(if_dnode->parent, ifp); running_config->version++; } } @@ -1650,7 +1652,32 @@ static int lib_interface_description_destroy(enum nb_event event, } /* clang-format off */ + +#if defined(__GNUC__) && ((__GNUC__ - 0) < 5) && !defined(__clang__) +/* gcc versions before 5.x miscalculate the size for structs with variable + * length arrays (they just count it as size 0) + */ +struct frr_yang_module_info_size3 { + /* YANG module name. */ + const char *name; + + /* Northbound callbacks. */ + const struct { + /* Data path of this YANG node. */ + const char *xpath; + + /* Callbacks implemented for this node. */ + struct nb_callbacks cbs; + + /* Priority - lower priorities are processed first. */ + uint32_t priority; + } nodes[3]; +}; + +const struct frr_yang_module_info_size3 frr_interface_info_size3 asm("frr_interface_info") = { +#else const struct frr_yang_module_info frr_interface_info = { +#endif .name = "frr-interface", .nodes = { { |
