aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/inet_diag.h1
-rw-r--r--net/dccp/diag.c1
-rw-r--r--net/ipv4/inet_diag.c5
-rw-r--r--net/ipv4/tcp_diag.c1
4 files changed, 2 insertions, 6 deletions
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h
index defe8ff36df8..851feff0747f 100644
--- a/include/linux/inet_diag.h
+++ b/include/linux/inet_diag.h
@@ -141,7 +141,6 @@ struct inet_diag_handler {
141 void (*idiag_get_info)(struct sock *sk, 141 void (*idiag_get_info)(struct sock *sk,
142 struct inet_diag_msg *r, 142 struct inet_diag_msg *r,
143 void *info); 143 void *info);
144 __u16 idiag_info_size;
145 __u16 idiag_type; 144 __u16 idiag_type;
146}; 145};
147 146
diff --git a/net/dccp/diag.c b/net/dccp/diag.c
index 424dcd8415d7..9343f52db284 100644
--- a/net/dccp/diag.c
+++ b/net/dccp/diag.c
@@ -52,7 +52,6 @@ static const struct inet_diag_handler dccp_diag_handler = {
52 .idiag_hashinfo = &dccp_hashinfo, 52 .idiag_hashinfo = &dccp_hashinfo,
53 .idiag_get_info = dccp_diag_get_info, 53 .idiag_get_info = dccp_diag_get_info,
54 .idiag_type = IPPROTO_DCCP, 54 .idiag_type = IPPROTO_DCCP,
55 .idiag_info_size = sizeof(struct tcp_info),
56}; 55};
57 56
58static int __init dccp_diag_init(void) 57static int __init dccp_diag_init(void)
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index b56b7ba8beeb..a247f85571c4 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -98,8 +98,7 @@ static int inet_csk_diag_fill(struct sock *sk,
98 minfo = INET_DIAG_PUT(skb, INET_DIAG_MEMINFO, sizeof(*minfo)); 98 minfo = INET_DIAG_PUT(skb, INET_DIAG_MEMINFO, sizeof(*minfo));
99 99
100 if (ext & (1 << (INET_DIAG_INFO - 1))) 100 if (ext & (1 << (INET_DIAG_INFO - 1)))
101 info = INET_DIAG_PUT(skb, INET_DIAG_INFO, 101 info = INET_DIAG_PUT(skb, INET_DIAG_INFO, sizeof(struct tcp_info));
102 handler->idiag_info_size);
103 102
104 if ((ext & (1 << (INET_DIAG_CONG - 1))) && icsk->icsk_ca_ops) { 103 if ((ext & (1 << (INET_DIAG_CONG - 1))) && icsk->icsk_ca_ops) {
105 const size_t len = strlen(icsk->icsk_ca_ops->name); 104 const size_t len = strlen(icsk->icsk_ca_ops->name);
@@ -299,7 +298,7 @@ static int inet_diag_get_exact(struct sk_buff *in_skb,
299 err = -ENOMEM; 298 err = -ENOMEM;
300 rep = alloc_skb(NLMSG_SPACE((sizeof(struct inet_diag_msg) + 299 rep = alloc_skb(NLMSG_SPACE((sizeof(struct inet_diag_msg) +
301 sizeof(struct inet_diag_meminfo) + 300 sizeof(struct inet_diag_meminfo) +
302 handler->idiag_info_size + 64)), 301 sizeof(struct tcp_info) + 64)),
303 GFP_KERNEL); 302 GFP_KERNEL);
304 if (!rep) 303 if (!rep)
305 goto out; 304 goto out;
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
index 981497795d49..42e6bec7bd3e 100644
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/tcp_diag.c
@@ -38,7 +38,6 @@ static const struct inet_diag_handler tcp_diag_handler = {
38 .idiag_hashinfo = &tcp_hashinfo, 38 .idiag_hashinfo = &tcp_hashinfo,
39 .idiag_get_info = tcp_diag_get_info, 39 .idiag_get_info = tcp_diag_get_info,
40 .idiag_type = IPPROTO_TCP, 40 .idiag_type = IPPROTO_TCP,
41 .idiag_info_size = sizeof(struct tcp_info),
42}; 41};
43 42
44static int __init tcp_diag_init(void) 43static int __init tcp_diag_init(void)