From: Stephen Smalley <sds@tycho.nsa.gov>
To: "Christian Göttsche" <cgzones@googlemail.com>, selinux@vger.kernel.org
Subject: Re: IPv6 netmask in nodecon statement
Date: Wed, 5 Feb 2020 13:01:24 -0500 [thread overview]
Message-ID: <12cfbae0-cb21-dba2-969d-b5e1daae9f2f@tycho.nsa.gov> (raw)
In-Reply-To: <CAJ2a_DeHkT3i2dW=A_3MywTK+pqcEmYfRg4BLRHSKiUxiqjLZg@mail.gmail.com>
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
prev parent reply other threads:[~2020-02-05 18:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-05 17:23 IPv6 netmask in nodecon statement Christian Göttsche
2020-02-05 18:01 ` Stephen Smalley [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12cfbae0-cb21-dba2-969d-b5e1daae9f2f@tycho.nsa.gov \
--to=sds@tycho.nsa.gov \
--cc=cgzones@googlemail.com \
--cc=selinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).