mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 12:25:02 +00:00
ospf6d: closing server socket when leaving ospf6d
this commit brings consistency as it closes the socket used to carry ospfv3 messages. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
c8b9f5fb12
commit
d51884e6e1
@ -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"
|
||||
@ -97,6 +98,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)
|
||||
{
|
||||
|
@ -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