summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_main.c
diff options
context:
space:
mode:
authorKaushik <kaushik@niralnetworks.com>2020-09-05 00:07:25 -0700
committerKaushik <kaushik@niralnetworks.com>2020-10-06 21:23:54 -0700
commit7df1f3623ec3fb47be4f3b8234c393067c69ab4d (patch)
tree9e9726980ed2c2be05e0e22da8d928eeb345b70f /ospf6d/ospf6_main.c
parent6d3ce189ad78fdd579f6b2683a0b15342c1cc7dd (diff)
ospf6d : Socket change for ospf6d vrf support.
1. The socket() call is changed to vrf_socket(). 2. The ospf6 instance creation api added. 3. The global socket fd is replaced with ospf6->fd. 4. All dependency of the global socket is resolved. 5. Added the ospf6 receive timer in the global structure. 6. Performed the thread off on receive timer when we do "no router ospf6". Co-authored-by: harios <hari@niralnetworks.com> Signed-off-by: Kaushik <kaushik@niralnetworks.com>
Diffstat (limited to 'ospf6d/ospf6_main.c')
-rw-r--r--ospf6d/ospf6_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c
index 182faf0038..8533c1b12c 100644
--- a/ospf6d/ospf6_main.c
+++ b/ospf6d/ospf6_main.c
@@ -55,7 +55,7 @@
#define OSPF6_VTY_PORT 2606
/* ospf6d privileges */
-zebra_capabilities_t _caps_p[] = {ZCAP_NET_RAW, ZCAP_BIND};
+zebra_capabilities_t _caps_p[] = {ZCAP_NET_RAW, ZCAP_BIND, ZCAP_SYS_ADMIN};
struct zebra_privs_t ospf6d_privs = {
#if defined(FRR_USER)
@@ -68,7 +68,7 @@ struct zebra_privs_t ospf6d_privs = {
.vty_group = VTY_GROUP,
#endif
.caps_p = _caps_p,
- .cap_num_p = 2,
+ .cap_num_p = array_size(_caps_p),
.cap_num_i = 0};
/* ospf6d options, we use GNU getopt library. */
@@ -86,6 +86,7 @@ static void __attribute__((noreturn)) ospf6_exit(int status)
if (ospf6) {
vrf = vrf_lookup_by_id(ospf6->vrf_id);
+ ospf6_serv_close(&ospf6->fd);
ospf6_delete(ospf6);
ospf6 = NULL;
} else
@@ -101,7 +102,6 @@ static void __attribute__((noreturn)) ospf6_exit(int status)
ospf6_asbr_terminate();
ospf6_lsa_terminate();
- ospf6_serv_close();
/* reverse access_list_init */
access_list_reset();