Skip to content

Commit c2a81a5

Browse files
author
Benjamin Berg
committed
data: Add and install P2P-WiFi-Display firewalld zone
This can be disabled by setting a meson option, which is e.g. sensible when building a Flatpak or on distributions that do not support firewalld. See: #134
1 parent 22880b0 commit c2a81a5

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

Diff for: data/P2P-WiFi-Display.xml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<zone target="ACCEPT">
3+
<short>GNOME Network Displays WiFi-Display</short>
4+
<description>A zone intended to be used by GNOME Network Displays when establishing P2P connections to Wi-Fi Display (Miracast) sinks.</description>
5+
<service name="dhcp"/>
6+
<service name="dns"/>
7+
<port port="7236" protocol="tcp"/>
8+
<protocol value="icmp"/>
9+
<protocol value="ipv6-icmp"/>
10+
<rule priority="32767">
11+
<reject/>
12+
</rule>
13+
</zone>
14+

Diff for: data/meson.build

+7
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,10 @@ if compile_schemas.found()
4141
args: ['--strict', '--dry-run', meson.current_source_dir()]
4242
)
4343
endif
44+
45+
if enable_firewalld_zone
46+
install_data(
47+
'P2P-WiFi-Display.xml',
48+
install_dir: join_paths(get_option('prefix'), 'lib', 'firewalld', 'zones')
49+
)
50+
endif

Diff for: meson.build

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ add_project_arguments([
2121
'-I' + meson.build_root(),
2222
], language: 'c')
2323

24+
enable_firewalld_zone = get_option('firewalld_zone')
25+
26+
2427
subdir('data')
2528
subdir('src')
2629
subdir('po')

Diff for: meson_options.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
option('firewalld_zone', type: 'boolean', value: true, description: 'Install firewalld zones')

0 commit comments

Comments
 (0)