* IPv6 netmask in nodecon statement
@ 2020-02-05 17:23 Christian Göttsche
2020-02-05 18:01 ` Stephen Smalley
0 siblings, 1 reply; 2+ messages in thread
From: Christian Göttsche @ 2020-02-05 17:23 UTC (permalink / raw)
To: selinux
Hi,
what is the correct way of specifying an ipv6 netmask in the nodecon statement?
I am searching for a valid netmask for localhost (::1).
'fe80::/10' should be one, but since the syntax does not support any
prefix-length, this is not compiling.
Using 'fe80::' seems to work fine, but setools is complaining [1].
Or should I use the full netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff' ?
[1]: https://github.com/SELinuxProject/setools/issues/40
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: IPv6 netmask in nodecon statement
2020-02-05 17:23 IPv6 netmask in nodecon statement Christian Göttsche
@ 2020-02-05 18:01 ` Stephen Smalley
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Smalley @ 2020-02-05 18:01 UTC (permalink / raw)
To: Christian Göttsche, selinux
On 2/5/20 12:23 PM, Christian Göttsche wrote:
> Hi,
>
> what is the correct way of specifying an ipv6 netmask in the nodecon statement?
> I am searching for a valid netmask for localhost (::1).
> 'fe80::/10' should be one, but since the syntax does not support any
> prefix-length, this is not compiling.
> Using 'fe80::' seems to work fine, but setools is complaining [1].
> Or should I use the full netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff' ?
>
>
> [1]: https://github.com/SELinuxProject/setools/issues/40
I think the userspace uses inet_pton(3) to convert both the mask and the
address strings to values, so it would have to be something accepted by
inet_pton(3).
In theory one could alter the userspace scanners/parsers and code to
also support the slash notation and use inet_net_pton(3) instead for the
mask. Don't think that was available when we started or at least didn't
know about it and it is a non-standard interface,
http://man7.org/linux/man-pages/man3/inet_net_pton.3.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-05 18:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-05 17:23 IPv6 netmask in nodecon statement Christian Göttsche
2020-02-05 18:01 ` Stephen Smalley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).