History

tcp_diag: report TCP MD5 signing keys and addresses

Report TCP MD5 (RFC2385) signing keys, addresses and address prefixes to processes with CAP_NET_ADMIN requesting INET_DIAG_INFO. Currently it is not possible to retrieve these from the kernel once they have been configured on sockets.

Ivan Delalande committed 9 years ago

Commit c03fa9b1 parent b37e8843 files · +113 −6Browse files

Showing the changes to include/uapi/linux (2 of 3 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/inet_diag.h +1 −0
  2. include/uapi/linux/tcp.h +9 −0
include/uapi/linux/inet_diag.h+1−0
@@ -143,6 +143,7 @@ enum { · 142 unmodified lines
143 INET_DIAG_MARK,143 INET_DIAG_MARK,
144 INET_DIAG_BBRINFO,144 INET_DIAG_BBRINFO,
145 INET_DIAG_CLASS_ID,145 INET_DIAG_CLASS_ID,
146 INET_DIAG_MD5SIG,
146 __INET_DIAG_MAX,147 __INET_DIAG_MAX,
147};148};
148 149
include/uapi/linux/tcp.h+9−0
@@ -256,4 +256,13 @@ struct tcp_md5sig { · 255 unmodified lines
256 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */256 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */
257};257};
258 258
259/* INET_DIAG_MD5SIG */
260struct tcp_diag_md5sig {
261 __u8 tcpm_family;
262 __u8 tcpm_prefixlen;
263 __u16 tcpm_keylen;
264 __be32 tcpm_addr[4];
265 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN];
266};
267
259#endif /* _UAPI_LINUX_TCP_H */268#endif /* _UAPI_LINUX_TCP_H */