diff options
-rw-r--r-- | include/uapi/linux/inet_diag.h | 3 | ||||
-rw-r--r-- | include/uapi/linux/unix_diag.h | 1 | ||||
-rw-r--r-- | net/ipv4/inet_diag.c | 3 | ||||
-rw-r--r-- | net/unix/diag.c | 3 |
4 files changed, 9 insertions, 1 deletions
diff --git a/include/uapi/linux/inet_diag.h b/include/uapi/linux/inet_diag.h index 8c469af939aa..bbde90fa5838 100644 --- a/include/uapi/linux/inet_diag.h +++ b/include/uapi/linux/inet_diag.h | |||
@@ -109,9 +109,10 @@ enum { | |||
109 | INET_DIAG_TOS, | 109 | INET_DIAG_TOS, |
110 | INET_DIAG_TCLASS, | 110 | INET_DIAG_TCLASS, |
111 | INET_DIAG_SKMEMINFO, | 111 | INET_DIAG_SKMEMINFO, |
112 | INET_DIAG_SHUTDOWN, | ||
112 | }; | 113 | }; |
113 | 114 | ||
114 | #define INET_DIAG_MAX INET_DIAG_SKMEMINFO | 115 | #define INET_DIAG_MAX INET_DIAG_SHUTDOWN |
115 | 116 | ||
116 | 117 | ||
117 | /* INET_DIAG_MEM */ | 118 | /* INET_DIAG_MEM */ |
diff --git a/include/uapi/linux/unix_diag.h b/include/uapi/linux/unix_diag.h index b1d2bf16b33c..b8a24941db21 100644 --- a/include/uapi/linux/unix_diag.h +++ b/include/uapi/linux/unix_diag.h | |||
@@ -37,6 +37,7 @@ enum { | |||
37 | UNIX_DIAG_ICONS, | 37 | UNIX_DIAG_ICONS, |
38 | UNIX_DIAG_RQLEN, | 38 | UNIX_DIAG_RQLEN, |
39 | UNIX_DIAG_MEMINFO, | 39 | UNIX_DIAG_MEMINFO, |
40 | UNIX_DIAG_SHUTDOWN, | ||
40 | 41 | ||
41 | UNIX_DIAG_MAX, | 42 | UNIX_DIAG_MAX, |
42 | }; | 43 | }; |
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index 535584c00f91..e5bad82d3584 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
@@ -105,6 +105,9 @@ int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk, | |||
105 | r->id.idiag_src[0] = inet->inet_rcv_saddr; | 105 | r->id.idiag_src[0] = inet->inet_rcv_saddr; |
106 | r->id.idiag_dst[0] = inet->inet_daddr; | 106 | r->id.idiag_dst[0] = inet->inet_daddr; |
107 | 107 | ||
108 | if (nla_put_u8(skb, INET_DIAG_SHUTDOWN, sk->sk_shutdown)) | ||
109 | goto errout; | ||
110 | |||
108 | /* IPv6 dual-stack sockets use inet->tos for IPv4 connections, | 111 | /* IPv6 dual-stack sockets use inet->tos for IPv4 connections, |
109 | * hence this needs to be included regardless of socket family. | 112 | * hence this needs to be included regardless of socket family. |
110 | */ | 113 | */ |
diff --git a/net/unix/diag.c b/net/unix/diag.c index 06748f108a57..5ac19dc1d5e4 100644 --- a/net/unix/diag.c +++ b/net/unix/diag.c | |||
@@ -151,6 +151,9 @@ static int sk_diag_fill(struct sock *sk, struct sk_buff *skb, struct unix_diag_r | |||
151 | sock_diag_put_meminfo(sk, skb, UNIX_DIAG_MEMINFO)) | 151 | sock_diag_put_meminfo(sk, skb, UNIX_DIAG_MEMINFO)) |
152 | goto out_nlmsg_trim; | 152 | goto out_nlmsg_trim; |
153 | 153 | ||
154 | if (nla_put_u8(skb, UNIX_DIAG_SHUTDOWN, sk->sk_shutdown)) | ||
155 | goto out_nlmsg_trim; | ||
156 | |||
154 | return nlmsg_end(skb, nlh); | 157 | return nlmsg_end(skb, nlh); |
155 | 158 | ||
156 | out_nlmsg_trim: | 159 | out_nlmsg_trim: |