projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sock_diag: define destruction multicast groups
[cascardo/linux.git]
/
net
/
core
/
sock.c
diff --git
a/net/core/sock.c
b/net/core/sock.c
index
7063c32
..
1e1fe9a
100644
(file)
--- a/
net/core/sock.c
+++ b/
net/core/sock.c
@@
-131,6
+131,7
@@
#include <linux/ipsec.h>
#include <net/cls_cgroup.h>
#include <net/netprio_cgroup.h>
#include <linux/ipsec.h>
#include <net/cls_cgroup.h>
#include <net/netprio_cgroup.h>
+#include <linux/sock_diag.h>
#include <linux/filter.h>
#include <linux/filter.h>
@@
-1423,7
+1424,7
@@
struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
}
EXPORT_SYMBOL(sk_alloc);
}
EXPORT_SYMBOL(sk_alloc);
-
static void __sk_free
(struct sock *sk)
+
void sk_destruct
(struct sock *sk)
{
struct sk_filter *filter;
{
struct sk_filter *filter;
@@
-1451,6
+1452,14
@@
static void __sk_free(struct sock *sk)
sk_prot_free(sk->sk_prot_creator, sk);
}
sk_prot_free(sk->sk_prot_creator, sk);
}
+static void __sk_free(struct sock *sk)
+{
+ if (unlikely(sock_diag_has_destroy_listeners(sk)))
+ sock_diag_broadcast_destroy(sk);
+ else
+ sk_destruct(sk);
+}
+
void sk_free(struct sock *sk)
{
/*
void sk_free(struct sock *sk)
{
/*