aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/uapi/linux/inet_diag.h
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2020-07-09 15:12:39 +0200
committerDavid S. Miller <davem@davemloft.net>2020-07-09 12:38:41 -0700
commit3f935c75eb52dd968351dba824adf466fb9c9429 (patch)
treefc09c79634a6d1d63dd0ad6ae77482638a5c7d4d /include/uapi/linux/inet_diag.h
parentnet: enetc: use eth_broadcast_addr() to assign broadcast (diff)
downloadwireguard-linux-3f935c75eb52dd968351dba824adf466fb9c9429.tar.xz
wireguard-linux-3f935c75eb52dd968351dba824adf466fb9c9429.zip
inet_diag: support for wider protocol numbers
After commit bf9765145b85 ("sock: Make sk_protocol a 16-bit value") the current size of 'sdiag_protocol' is not sufficient to represent the possible protocol values. This change introduces a new inet diag request attribute to let user space specify the relevant protocol number using u32 values. The attribute is parsed by inet diag core on get/dump command and the extended protocol value, if available, is preferred to 'sdiag_protocol' to lookup the diag handler. The parse attributed are exposed to all the diag handlers via the cb->data. Note that inet_diag_dump_one_icsk() is left unmodified, as it will not be used by protocol using the extended attribute. Suggested-by: David S. Miller <davem@davemloft.net> Co-developed-by: Christoph Paasch <cpaasch@apple.com> Signed-off-by: Christoph Paasch <cpaasch@apple.com> Acked-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/inet_diag.h')
-rw-r--r--include/uapi/linux/inet_diag.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/inet_diag.h b/include/uapi/linux/inet_diag.h
index e6f183ee8417..5ba122c1949a 100644
--- a/include/uapi/linux/inet_diag.h
+++ b/include/uapi/linux/inet_diag.h
@@ -65,6 +65,7 @@ enum {
INET_DIAG_REQ_NONE,
INET_DIAG_REQ_BYTECODE,
INET_DIAG_REQ_SK_BPF_STORAGES,
+ INET_DIAG_REQ_PROTOCOL,
__INET_DIAG_REQ_MAX,
};