ptp4l not allowed to use L2 transport

Solution In Progress - Updated -

Issue

When ptp4l is configured to use the L2 transport, it fails to open the raw socket due to a selinux policy.
In the permissive mode I get the following AVCs:

type=AVC msg=audit(1570462720.524:1061): avc:  denied  { create } for  pid=10793 comm="ptp4l" scontext=system_u:system_r:ptp4l_t:s0 tcontext=system_u:system_r:ptp4l_t:s0 tclass=packet_socket permissive=1
type=AVC msg=audit(1570462720.524:1062): avc:  denied  { ioctl } for  pid=10793 comm="ptp4l" path="socket:[38157]" dev="sockfs" ino=38157 ioctlcmd=8933 scontext=system_u:system_r:ptp4l_t:s0 tcontext=system_u:system_r:ptp4l_t:s0 tclass=packet_socket permissive=1
type=AVC msg=audit(1570462720.524:1063): avc:  denied  { bind } for  pid=10793 comm="ptp4l" scontext=system_u:system_r:ptp4l_t:s0 tcontext=system_u:system_r:ptp4l_t:s0 tclass=packet_socket permissive=1
type=AVC msg=audit(1570462720.530:1064): avc:  denied  { setopt } for  pid=10793 comm="ptp4l" scontext=system_u:system_r:ptp4l_t:s0 tcontext=system_u:system_r:ptp4l_t:s0 tclass=packet_socket permissive=1

Environment

  • Red Hat Enterprise Linux (RHEL) 7
  • linuxptp
  • selinux-policy

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content