diff options
| author | Christian Göttsche <[email protected]> | 2025-03-18 08:33:34 +0000 |
|---|---|---|
| committer | Paul Moore <[email protected]> | 2025-04-11 20:29:50 +0000 |
| commit | 47a1a15645d558699765f0f7e82032302ae47a46 (patch) | |
| tree | a47ad8fc169c6c2d44afef07b77dbe4741e8dbd5 /security/selinux/netnode.c | |
| parent | Linux 6.15-rc1 (diff) | |
| download | kernel-47a1a15645d558699765f0f7e82032302ae47a46.tar.gz kernel-47a1a15645d558699765f0f7e82032302ae47a46.zip | |
selinux: constify network address pointer
The network address, either an IPv4 or IPv6 one, is not modified.
Signed-off-by: Christian Göttsche <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
Diffstat (limited to 'security/selinux/netnode.c')
| -rw-r--r-- | security/selinux/netnode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/security/selinux/netnode.c b/security/selinux/netnode.c index 5c8c77e50aad..b7900d5ae557 100644 --- a/security/selinux/netnode.c +++ b/security/selinux/netnode.c @@ -187,7 +187,7 @@ static void sel_netnode_insert(struct sel_netnode *node) * failure. * */ -static int sel_netnode_sid_slow(void *addr, u16 family, u32 *sid) +static int sel_netnode_sid_slow(const void *addr, u16 family, u32 *sid) { int ret; struct sel_netnode *node; @@ -207,13 +207,13 @@ static int sel_netnode_sid_slow(void *addr, u16 family, u32 *sid) ret = security_node_sid(PF_INET, addr, sizeof(struct in_addr), sid); if (new) - new->nsec.addr.ipv4 = *(__be32 *)addr; + new->nsec.addr.ipv4 = *(const __be32 *)addr; break; case PF_INET6: ret = security_node_sid(PF_INET6, addr, sizeof(struct in6_addr), sid); if (new) - new->nsec.addr.ipv6 = *(struct in6_addr *)addr; + new->nsec.addr.ipv6 = *(const struct in6_addr *)addr; break; default: BUG(); @@ -247,7 +247,7 @@ static int sel_netnode_sid_slow(void *addr, u16 family, u32 *sid) * on failure. * */ -int sel_netnode_sid(void *addr, u16 family, u32 *sid) +int sel_netnode_sid(const void *addr, u16 family, u32 *sid) { struct sel_netnode *node; |
