]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sunrpc: add netlink upcall for the auth.unix.ip cache
authorJeff Layton <jlayton@kernel.org>
Wed, 25 Mar 2026 14:40:29 +0000 (10:40 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 1 Jun 2026 15:08:18 +0000 (11:08 -0400)
commit712bdbb2153bdb99d4a9d0cdcae24b484610147f
tree7fbdbf997902346acafcc0de98a2c6f638e35452
parentaf81cb247ca94e4bcfea31ea862cf3aaf955a503
sunrpc: add netlink upcall for the auth.unix.ip cache

Add netlink-based cache upcall support for the ip_map (auth.unix.ip)
cache, using the sunrpc generic netlink family.

Add ip-map attribute-set (seqno, class, addr, domain, negative, expiry),
ip-map-reqs wrapper, and ip-map-get-reqs / ip-map-set-reqs operations
to the sunrpc_cache YAML spec and generated headers.

Implement sunrpc_nl_ip_map_get_reqs_dumpit() which snapshots pending
ip_map cache requests and sends each entry's seqno, class name, and
IP address over netlink.

Implement sunrpc_nl_ip_map_set_reqs_doit() which parses ip_map cache
responses from userspace (class, addr, expiry, and domain name or
negative flag) and updates the cache via __ip_map_lookup() /
__ip_map_update().

Wire up ip_map_notify() callback in ip_map_cache_template so cache
misses trigger SUNRPC_CMD_CACHE_NOTIFY multicast events with
SUNRPC_CACHE_TYPE_IP_MAP.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Documentation/netlink/specs/sunrpc_cache.yaml
include/uapi/linux/sunrpc_netlink.h
net/sunrpc/netlink.c
net/sunrpc/netlink.h
net/sunrpc/svcauth_unix.c