Skip to content

Commit 556f017

Browse files
committed
pbr: update to 1.2.0-r2
Makefile: * stop shipping/dealing with the firewall hotplug (obsolete) * install a third user-script (dnsprefetch) by @Betonmischer Config: * remove obsolete options * include the new user script Init-script: * start much earlier so that on boot, the procd_add_raw_trigger works on all systems * create a ubus() helper function so that service delete does not produce "Command not found" * rename options to better reflect their function: * procd_lan_device to lan_device * procd_wan_interface to uplink_interface * procd_wan6_interface to uplink_interface6 * procd_wan6_metric to uplink_interface6_metric * wan_ip_rules_priority to uplink_ip_rules_priority * wan_mark to uplink_mark * visually separate run-time variables from variables loaded from config options * use ${IPKG_INSTROOT} when sourcing files in case it will ever run on build host in the future * fix typo in str_to_dnsmasq_nftset() * use pidof to kill dnsmasq in dnsmasq_kill() * add helper function uci_add_list_if_new() * add helper function uci_changes() * add helper function ubus() so that service delete does not produce "Command not found" * implement the dnsmasq features check similar to dnsmasq init script * add get_url() function similar to luci package * add/modify error and warning messages * change how mktemp is used for more reliable file creation * unset non-true boolean package config options on load for easier checks later * improve handling of nft/nft set options * fewer calls to resolver() and resolver() optimization to speed up the service * use softlinks instead of duplicating dnsmasq nftset files into each instance * prevent duplication of dnsmasq nftset elements * option to target a specific dest dns port in DNS policies * bugfix: more reliable interface reloads * display README links to errors/warnings sections if any errors/warnings discovered Uci-defaults: * transition from old options to new ones Signed-off-by: Stan Grishin <[email protected]> (cherry picked from commit 3edde10)
1 parent ed702ba commit 556f017

File tree

5 files changed

+500
-418
lines changed

5 files changed

+500
-418
lines changed

net/pbr/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
include $(TOPDIR)/rules.mk
55

66
PKG_NAME:=pbr
7-
PKG_VERSION:=1.1.8
8-
PKG_RELEASE:=36
7+
PKG_VERSION:=1.2.0
8+
PKG_RELEASE:=2
99
PKG_LICENSE:=AGPL-3.0-or-later
1010
PKG_MAINTAINER:=Stan Grishin <[email protected]>
1111

@@ -75,7 +75,7 @@ define Package/pbr/default/install
7575
$(INSTALL_CONF) ./files/etc/config/pbr $(1)/etc/config/pbr
7676
$(INSTALL_DIR) $(1)/usr/share/pbr
7777
$(INSTALL_DATA) ./files/usr/share/pbr/.keep $(1)/usr/share/pbr/.keep
78-
$(INSTALL_DATA) ./files/usr/share/pbr/firewall.include $(1)/usr/share/pbr/firewall.include
78+
$(INSTALL_DATA) ./files/usr/share/pbr/pbr.user.dnsprefetch $(1)/usr/share/pbr/pbr.user.dnsprefetch
7979
$(INSTALL_DATA) ./files/usr/share/pbr/pbr.user.aws $(1)/usr/share/pbr/pbr.user.aws
8080
$(INSTALL_DATA) ./files/usr/share/pbr/pbr.user.netflix $(1)/usr/share/pbr/pbr.user.netflix
8181
$(INSTALL_DIR) $(1)/usr/share/nftables.d
@@ -113,7 +113,6 @@ define Package/pbr/prerm
113113
#!/bin/sh
114114
# check if we are on real system
115115
if [ -z "$${IPKG_INSTROOT}" ]; then
116-
uci -q delete firewall.pbr || true
117116
echo -n "Stopping pbr service... "
118117
/etc/init.d/pbr stop quiet >/dev/null 2>&1 && echo "OK" || echo "FAIL"
119118
echo -n "Removing rc.d symlink for pbr... "
@@ -148,7 +147,6 @@ define Package/pbr-netifd/prerm
148147
#!/bin/sh
149148
# check if we are on real system
150149
if [ -z "$${IPKG_INSTROOT}" ]; then
151-
uci -q delete firewall.pbr || true
152150
echo -n "Stopping pbr-netifd service... "
153151
/etc/init.d/pbr stop quiet >/dev/null 2>&1 && echo "OK" || echo "FAIL"
154152
echo -n "Removing rc.d symlink for pbr... "

net/pbr/files/etc/config/pbr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
config pbr 'config'
2-
option debug_dnsmasq '0'
32
option enabled '0'
43
option verbosity '2'
54
option strict_enforcement '1'
65
option resolver_set 'dnsmasq.nftset'
76
list resolver_instance '*'
87
option ipv6_enabled '0'
98
list ignored_interface 'vpnserver'
10-
option boot_timeout '30'
119
option rule_create_option 'add'
1210
option procd_boot_trigger_delay '5000'
1311
option procd_reload_delay '1'
@@ -26,6 +24,10 @@ config pbr 'config'
2624
list webui_supported_protocol 'tcp udp'
2725
list webui_supported_protocol 'icmp'
2826

27+
config include
28+
option path '/usr/share/pbr/pbr.user.dnsprefetch'
29+
option enabled '0'
30+
2931
config include
3032
option path '/usr/share/pbr/pbr.user.aws'
3133
option enabled '0'

0 commit comments

Comments
 (0)