Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force enable on some OMR-ByPass rules #554

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions omr-bypass/files/etc/init.d/omr-bypass-nft
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ _bypass_domain() {
fi
if [ "$(uci -q get dhcp.omr_dst_bypass_$intf | grep /$domain/)" = "" ]; then
uci -q add_list dhcp.omr_dst_bypass_$intf.domain="$domain"
uci -q set firewall.omr_dst_bypass_${type}_4.enabled='1'
uci -q set firewall.omr_dst_bypass_${type}_dstip_4.enabled='1'
uci -q set firewall.omr_dst_bypass_${type}_dstip_4_accept.enabled='1'
if [ "$noipv6" != "1" ]; then
uci -q set firewall.omr_dst_bypass_${type}_6.enabled='1'
uci -q set firewall.omr_dst_bypass_${type}_dstip_6.enabled='1'
uci -q set firewall.omr_dst_bypass_${type}_dstip_6_accept.enabled='1'
fi
add_domains="true"
fi
if [ "$(uci -q get dhcp.@dnsmasq[0].noipv6 | grep /$domain/)" = "" ] && [ "$noipv6" = "1" ]; then
Expand Down Expand Up @@ -430,6 +438,7 @@ _bypass_proto_without_ndpi() {
set firewall.bypass_$proto.name="bypass_$proto"
set firewall.bypass_$proto.match='dest_ip'
set firewall.bypass_$proto.family='ipv4'
set firewall.bypass_$proto.enabled='1'
set firewall.bypass_$proto_rule=rule
set firewall.bypass_$proto_rule.name="bypass_$proto_rule"
set firewall.bypass_$proto_rule.src='lan'
Expand All @@ -438,6 +447,7 @@ _bypass_proto_without_ndpi() {
set firewall.bypass_$proto_rule.family='ipv4'
set firewall.bypass_$proto_rule.target='MARK'
set firewall.bypass_$proto_rule.ipset="bypass_$proto"
set firewall.bypass_$proto_rule.enabled='1'
set firewall.bypass_$proto_rule.set_xmark="0x4539${intfid}"
commit firewall
EOF
Expand All @@ -446,6 +456,7 @@ _bypass_proto_without_ndpi() {
set firewall.bypass6_$proto.name="bypass6_$proto"
set firewall.bypass6_$proto.match='dest_ip'
set firewall.bypass6_$proto.family='ipv6'
set firewall.bypass6_$proto.enabled='1'
set firewall.bypass6_$proto_rule=rule
set firewall.bypass6_$proto_rule.name="bypass6_$proto_rule"
set firewall.bypass6_$proto_rule.src='lan'
Expand All @@ -455,6 +466,7 @@ _bypass_proto_without_ndpi() {
set firewall.bypass6_$proto_rule.target='MARK'
set firewall.bypass6_$proto_rule.set_xmark="0x6539${intfid}"
set firewall.bypass6_$proto_rule.ipset="bypass6_$proto"
set firewall.bypass6_$proto_rule.enabled='1'
commit firewall
EOF
#if [ "$intfid" != "" ]; then
Expand Down