For AF_INET6 sockets, the value of struct ipv6_pinfo.ipv6only is exported to userspace. It indicates whether a socket bound to in6addr_any listens on IPv4 as well as IPv6. Since the socket is natively IPv6, it is not listed by e.g. 'ss -l -4'. This patch is accompanied by an appropriate one for iproute2 to enable the additional information in 'ss -e'.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -112,9 +112,10 @@ enum { · 111 unmodified lines | ||
| 112 | 112 | INET_DIAG_SHUTDOWN, |
| 113 | 113 | INET_DIAG_DCTCPINFO, |
| 114 | 114 | INET_DIAG_PROTOCOL, /* response attribute only */ |
| 115 | + INET_DIAG_SKV6ONLY, | |
| 115 | 116 | }; |
| 116 | 117 | |
| 117 | −#define INET_DIAG_MAX INET_DIAG_PROTOCOL | |
| 118 | +#define INET_DIAG_MAX INET_DIAG_SKV6ONLY | |
| 118 | 119 | |
| 119 | 120 | /* INET_DIAG_MEM */ |
| 120 | 121 | |