aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/inet_diag.h3
-rw-r--r--net/ipv4/inet_diag.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h
index afa5d5c74169..34e8d52c1925 100644
--- a/include/linux/inet_diag.h
+++ b/include/linux/inet_diag.h
@@ -108,9 +108,10 @@ enum {
108 INET_DIAG_CONG, 108 INET_DIAG_CONG,
109 INET_DIAG_TOS, 109 INET_DIAG_TOS,
110 INET_DIAG_TCLASS, 110 INET_DIAG_TCLASS,
111 INET_DIAG_SKMEMINFO,
111}; 112};
112 113
113#define INET_DIAG_MAX INET_DIAG_TCLASS 114#define INET_DIAG_MAX INET_DIAG_SKMEMINFO
114 115
115 116
116/* INET_DIAG_MEM */ 117/* INET_DIAG_MEM */
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index fb2e47ff59f7..2240a8e8c44d 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -136,6 +136,10 @@ int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
136 minfo->idiag_tmem = sk_wmem_alloc_get(sk); 136 minfo->idiag_tmem = sk_wmem_alloc_get(sk);
137 } 137 }
138 138
139 if (ext & (1 << (INET_DIAG_SKMEMINFO - 1)))
140 if (sock_diag_put_meminfo(sk, skb, INET_DIAG_SKMEMINFO))
141 goto rtattr_failure;
142
139 if (icsk == NULL) { 143 if (icsk == NULL) {
140 r->idiag_rqueue = r->idiag_wqueue = 0; 144 r->idiag_rqueue = r->idiag_wqueue = 0;
141 goto out; 145 goto out;