Browse Source

fix(nftables.ut): ruleset load error

Fix ruleset con't load while neteasemusic_addr is null

Signed-off-by: ZiMing Mo <[email protected]>
ZiMing Mo 2 years ago
parent
commit
44f66b476d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      root/usr/share/unblockneteasemusic/nftables.ut

+ 2 - 0
root/usr/share/unblockneteasemusic/nftables.ut

@@ -34,11 +34,13 @@ set neteasemusic {
 	flags interval;
 	auto-merge;
 
+	{% if (neteasemusic_addr): %}
 	elements = {
 		{% for (let addr in split(trim(neteasemusic_addr), '\n')): %}
 		{{ addr }},
 		{% endfor %}
 	}
+	{% endif %}
 }
 
 chain netease_cloud_music {