]> git.puffer.fish Git - mirror/frr.git/commitdiff
Revert "bgpd: register nb routing hook"
authorIgor Ryzhov <iryzhov@nfware.com>
Thu, 13 May 2021 23:16:29 +0000 (02:16 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Tue, 3 Aug 2021 20:36:31 +0000 (23:36 +0300)
This reverts commit 374069da83f5f00f53156e1886372391c3f00b3f.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
bgpd/bgp_main.c
bgpd/bgp_nb.h
bgpd/bgp_nb_config.c

index 6736671f37d1e5ed96a78b2f3f30c1fe75025343..00dbbc951caa935fa2d0d0728a5f196cbfc9ca31 100644 (file)
@@ -517,10 +517,6 @@ int main(int argc, char **argv)
        bgp_script_init();
 #endif
 
-       hook_register(routing_conf_event,
-                     routing_control_plane_protocols_name_validate);
-
-
        /* BGP related initialization.  */
        bgp_init((unsigned short)instance);
 
index 2a3405786c94f7c82138047302d20b5f0a0d491d..6d08988b68937be69991c83ba8465da958c14cc0 100644 (file)
@@ -3401,13 +3401,6 @@ int routing_control_plane_protocols_control_plane_protocol_bgp_peer_groups_peer_
 int routing_control_plane_protocols_control_plane_protocol_bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_soft_reconfiguration_modify(
        struct nb_cb_modify_args *args);
 
-/*
- * Callback registered with routing_nb lib to validate only
- * one instance of bgp instance is allowed
- */
-int routing_control_plane_protocols_name_validate(
-       struct nb_cb_create_args *args);
-
 /* Optional 'cli_show' callbacks. */
 void cli_show_router_bgp(struct vty *vty, struct lyd_node *dnode,
                         bool show_defaults);
index 332fd7c29461382731630b9fa04c269f708a790f..1c91b1e3429556b971154013b8939f1b81d44b49 100644 (file)
@@ -48,20 +48,6 @@ FRR_CFG_DEFAULT_ULONG(BGP_KEEPALIVE,
         { .val_ulong = 60 },
 );
 
-int routing_control_plane_protocols_name_validate(
-       struct nb_cb_create_args *args)
-{
-       const char *name;
-
-       name = yang_dnode_get_string(args->dnode, "./name");
-       if (!strmatch(name, "bgp")) {
-               snprintf(args->errmsg, args->errmsg_len,
-                        "per vrf only one bgp instance is supported.");
-               return NB_ERR_VALIDATION;
-       }
-       return NB_OK;
-}
-
 /*
  * XPath:
  * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global