mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 13:06:51 +00:00
Merge pull request #3802 from pguibert6WIND/ospfv3_misc_fixes
Ospfv3 misc fixes
This commit is contained in:
commit
5243b754dc
@ -1022,3 +1022,16 @@ void ospf6_area_init(void)
|
||||
install_element(OSPF6_NODE, &area_filter_list_cmd);
|
||||
install_element(OSPF6_NODE, &no_area_filter_list_cmd);
|
||||
}
|
||||
|
||||
void ospf6_area_interface_delete(struct ospf6_interface *oi)
|
||||
{
|
||||
struct ospf6_area *oa;
|
||||
struct listnode *node, *nnode;
|
||||
|
||||
if (!ospf6)
|
||||
return;
|
||||
for (ALL_LIST_ELEMENTS(ospf6->area_list, node, nnode, oa))
|
||||
if(listnode_lookup(oa->if_list, oi))
|
||||
listnode_delete(oa->if_list, oi);
|
||||
|
||||
}
|
||||
|
@ -132,5 +132,7 @@ extern void ospf6_area_show(struct vty *, struct ospf6_area *);
|
||||
extern void ospf6_area_plist_update(struct prefix_list *plist, int add);
|
||||
extern void ospf6_area_config_write(struct vty *vty);
|
||||
extern void ospf6_area_init(void);
|
||||
struct ospf6_interface;
|
||||
extern void ospf6_area_interface_delete(struct ospf6_interface *oi);
|
||||
|
||||
#endif /* OSPF_AREA_H */
|
||||
|
@ -269,6 +269,9 @@ void ospf6_interface_delete(struct ospf6_interface *oi)
|
||||
|
||||
ospf6_bfd_info_free(&(oi->bfd_info));
|
||||
|
||||
/* disable from area list if possible */
|
||||
ospf6_area_interface_delete(oi);
|
||||
|
||||
XFREE(MTYPE_OSPF6_IF, oi);
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "ospf6d.h"
|
||||
#include "ospf6_top.h"
|
||||
#include "ospf6_message.h"
|
||||
#include "ospf6_network.h"
|
||||
#include "ospf6_asbr.h"
|
||||
#include "ospf6_lsa.h"
|
||||
#include "ospf6_interface.h"
|
||||
@ -84,8 +85,10 @@ static void __attribute__((noreturn)) ospf6_exit(int status)
|
||||
|
||||
frr_early_fini();
|
||||
|
||||
if (ospf6)
|
||||
if (ospf6) {
|
||||
ospf6_delete(ospf6);
|
||||
ospf6 = NULL;
|
||||
}
|
||||
|
||||
bfd_gbl_exit();
|
||||
|
||||
@ -97,6 +100,7 @@ static void __attribute__((noreturn)) ospf6_exit(int status)
|
||||
ospf6_asbr_terminate();
|
||||
ospf6_lsa_terminate();
|
||||
|
||||
ospf6_serv_close();
|
||||
/* reverse access_list_init */
|
||||
access_list_reset();
|
||||
|
||||
|
@ -73,6 +73,15 @@ static void ospf6_set_checksum(void)
|
||||
#endif /* DISABLE_IPV6_CHECKSUM */
|
||||
}
|
||||
|
||||
void ospf6_serv_close(void)
|
||||
{
|
||||
if (ospf6_sock > 0) {
|
||||
close(ospf6_sock);
|
||||
ospf6_sock = -1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Make ospf6d's server socket. */
|
||||
int ospf6_serv_sock(void)
|
||||
{
|
||||
@ -163,6 +172,7 @@ int ospf6_sendmsg(struct in6_addr *src, struct in6_addr *dst,
|
||||
assert(dst);
|
||||
assert(*ifindex);
|
||||
|
||||
memset(&cmsgbuf, 0, sizeof(cmsgbuf));
|
||||
scmsgp = (struct cmsghdr *)&cmsgbuf;
|
||||
pktinfo = (struct in6_pktinfo *)(CMSG_DATA(scmsgp));
|
||||
memset(&dst_sin6, 0, sizeof(struct sockaddr_in6));
|
||||
|
@ -26,6 +26,7 @@ extern struct in6_addr allspfrouters6;
|
||||
extern struct in6_addr alldrouters6;
|
||||
|
||||
extern int ospf6_serv_sock(void);
|
||||
extern void ospf6_serv_close(void);
|
||||
extern int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option);
|
||||
|
||||
extern int ospf6_sendmsg(struct in6_addr *, struct in6_addr *, ifindex_t *,
|
||||
|
Loading…
Reference in New Issue
Block a user