2012-01-04 09:33:27 -08:00
|
|
|
# Network types
|
|
|
|
type node, node_type;
|
|
|
|
type netif, netif_type;
|
|
|
|
type port, port_type;
|
2013-09-30 12:07:55 -07:00
|
|
|
|
|
|
|
# Use network sockets.
|
2014-02-24 07:48:03 -08:00
|
|
|
allow netdomain self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow netdomain self:{ udp_socket rawip_socket } create_socket_perms;
|
2013-09-30 12:07:55 -07:00
|
|
|
# Connect to ports.
|
|
|
|
allow netdomain port_type:tcp_socket name_connect;
|
|
|
|
# Bind to ports.
|
|
|
|
allow netdomain node_type:{ tcp_socket udp_socket } node_bind;
|
|
|
|
allow netdomain port_type:udp_socket name_bind;
|
|
|
|
allow netdomain port_type:tcp_socket name_bind;
|
2014-02-24 07:48:03 -08:00
|
|
|
# See changes to the routing table.
|
2016-04-15 10:54:40 -07:00
|
|
|
allow netdomain self:netlink_route_socket { create read getattr write setattr lock append bind connect getopt setopt shutdown nlmsg_read };
|
2013-09-30 12:07:55 -07:00
|
|
|
|
|
|
|
# Talks to netd via dnsproxyd socket.
|
|
|
|
unix_socket_connect(netdomain, dnsproxyd, netd)
|
2014-02-24 10:04:49 -08:00
|
|
|
|
2014-05-01 11:12:10 -07:00
|
|
|
# Talks to netd via fwmarkd socket.
|
|
|
|
unix_socket_connect(netdomain, fwmarkd, netd)
|
|
|
|
|
2014-02-24 10:04:49 -08:00
|
|
|
# Connect to mdnsd via mdnsd socket.
|
|
|
|
unix_socket_connect(netdomain, mdnsd, mdnsd)
|