diff --git a/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js index 69200e35a2..e979ecad43 100644 --- a/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js +++ b/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js @@ -1809,24 +1809,26 @@ return view.extend({ o.placeholder = '201'; o.rmempty = true; - if (L.hasSystemFeature('hostapd', 'ocv') || L.hasSystemFeature('wpasupplicant', 'ocv')) { - o = ss.taboption('encryption', form.ListValue, 'ocv', _('Operating Channel Validation'), _("Note: Workaround mode allows a STA that claims OCV capability to connect even if the STA doesn't send OCI or negotiate PMF.")); - o.value('0', _('Disabled')); - o.value('1', _('Enabled')); - o.value('2', _('Enabled (workaround mode)')); - o.default = '0'; - o.depends('ieee80211w', '1'); - o.depends('ieee80211w', '2'); - - o.validate = function(section_id, value) { - var modeopt = this.section.children.filter(function(o) { return o.option == 'mode' })[0], - modeval = modeopt.formvalue(section_id); - - if ((value == '2') && ((modeval == 'sta') || (modeval == 'sta-wds'))) { - return _('Workaround mode can only be used when acting as an access point.'); - } + if (not (string.find(uci.get('openmptcprouter','settings','version'), '5.4'))) { + if (L.hasSystemFeature('hostapd', 'ocv') || L.hasSystemFeature('wpasupplicant', 'ocv')) { + o = ss.taboption('encryption', form.ListValue, 'ocv', _('Operating Channel Validation'), _("Note: Workaround mode allows a STA that claims OCV capability to connect even if the STA doesn't send OCI or negotiate PMF.")); + o.value('0', _('Disabled')); + o.value('1', _('Enabled')); + o.value('2', _('Enabled (workaround mode)')); + o.default = '0'; + o.depends('ieee80211w', '1'); + o.depends('ieee80211w', '2'); + + o.validate = function(section_id, value) { + var modeopt = this.section.children.filter(function(o) { return o.option == 'mode' })[0], + modeval = modeopt.formvalue(section_id); + + if ((value == '2') && ((modeval == 'sta') || (modeval == 'sta-wds'))) { + return _('Workaround mode can only be used when acting as an access point.'); + } - return true; + return true; + } } } diff --git a/omr-bypass/files/etc/init.d/omr-bypass-nft b/omr-bypass/files/etc/init.d/omr-bypass-nft index a922412b05..2640ac9f32 100755 --- a/omr-bypass/files/etc/init.d/omr-bypass-nft +++ b/omr-bypass/files/etc/init.d/omr-bypass-nft @@ -433,6 +433,7 @@ _bypass_proto_without_ndpi() { set firewall.bypass_$proto_rule=rule set firewall.bypass_$proto_rule.name="bypass_$proto_rule" set firewall.bypass_$proto_rule.src='lan' + set firewall.bypass_$proto_rule.proto='all' set firewall.bypass_$proto_rule.dest='*' set firewall.bypass_$proto_rule.family='ipv4' set firewall.bypass_$proto_rule.target='MARK' @@ -450,6 +451,7 @@ _bypass_proto_without_ndpi() { set firewall.bypass6_$proto_rule.src='lan' set firewall.bypass6_$proto_rule.family='ipv6' set firewall.bypass6_$proto_rule.dest='*' + set firewall.bypass6_$proto_rule.proto='all' set firewall.bypass6_$proto_rule.target='MARK' set firewall.bypass6_$proto_rule.set_xmark="0x6539${intfid}" set firewall.bypass6_$proto_rule.ipset="bypass6_$proto" @@ -645,6 +647,7 @@ _intf_rule() { set firewall.omr_dst_bypass_${intf}_dstip_${ipv46}.dest='*' set firewall.omr_dst_bypass_${intf}_dstip_${ipv46}.family="ipv${ipv46}" set firewall.omr_dst_bypass_${intf}_dstip_${ipv46}.enabled='0' + set firewall.omr_dst_bypass_${intf}_dstip_${ipv46}.proto='all' set firewall.omr_dst_bypass_${intf}_dstip_${ipv46}.set_mark="0x${ipv46}539${count}" set firewall.omr_dst_bypass_${intf}_dstip_${ipv46}_accept=rule set firewall.omr_dst_bypass_${intf}_dstip_${ipv46}_accept.name="omr_dst_bypass_${intf}_rule_accept" @@ -652,6 +655,7 @@ _intf_rule() { set firewall.omr_dst_bypass_${intf}_dstip_${ipv46}_accept.dest='*' set firewall.omr_dst_bypass_${intf}_dstip_${ipv46}_accept.family="ipv${ipv46}" set firewall.omr_dst_bypass_${intf}_dstip_${ipv46}_accept.enabled='0' + set firewall.omr_dst_bypass_${intf}_dstip_${ipv46}_accept.proto='all' set firewall.omr_dst_bypass_${intf}_dstip_${ipv46}_accept.mark="0x${ipv46}539${count}" set firewall.omr_dst_bypass_${intf}_srcip_${ipv46}=rule set firewall.omr_dst_bypass_${intf}_srcip_${ipv46}.name="omr_dst_bypass_${intf}_srcip" @@ -660,6 +664,7 @@ _intf_rule() { set firewall.omr_dst_bypass_${intf}_srcip_${ipv46}.family="ipv${ipv46}" set firewall.omr_dst_bypass_${intf}_srcip_${ipv46}.target='MARK' set firewall.omr_dst_bypass_${intf}_srcip_${ipv46}.enabled='0' + set firewall.omr_dst_bypass_${intf}_srcip_${ipv46}.proto='all' set firewall.omr_dst_bypass_${intf}_srcip_${ipv46}.set_xmark="0x${ipv46}539${count}" set firewall.omr_dst_bypass_${intf}_mac_${ipv46}=rule set firewall.omr_dst_bypass_${intf}_mac_${ipv46}.name='omr_dst_bypass_${intf}_mac' @@ -667,9 +672,10 @@ _intf_rule() { set firewall.omr_dst_bypass_${intf}_mac_${ipv46}.dest='*' set firewall.omr_dst_bypass_${intf}_mac_${ipv46}.target='MARK' set firewall.omr_dst_bypass_${intf}_mac_${ipv46}.enabled='0' + set firewall.omr_dst_bypass_${intf}_mac_${ipv46}.proto='all' set firewall.omr_dst_bypass_${intf}_mac_${ipv46}.set_xmark="0x${ipv46}539${count}" set firewall.omr_dst_bypass_${intf}_srcport_tcp_${ipv46}=rule - set firewall.omr_dst_bypass_${intf}_srcport_tcp_${ipv46}.name="omr_dst_bypass_${intf}_srcport" + set firewall.omr_dst_bypass_${intf}_srcport_tcp_${ipv46}.name="omr_dst_bypass_${intf}_srcport_tcp" set firewall.omr_dst_bypass_${intf}_srcport_tcp_${ipv46}.proto='tcp' set firewall.omr_dst_bypass_${intf}_srcport_tcp_${ipv46}.src='lan' set firewall.omr_dst_bypass_${intf}_srcport_tcp_${ipv46}.dest='*' @@ -677,7 +683,7 @@ _intf_rule() { set firewall.omr_dst_bypass_${intf}_srcport_tcp_${ipv46}.enabled='0' set firewall.omr_dst_bypass_${intf}_srcport_tcp_${ipv46}.set_xmark="0x${ipv46}539${count}" set firewall.omr_dst_bypass_${intf}_srcport_udp_${ipv46}=rule - set firewall.omr_dst_bypass_${intf}_srcport_udp_${ipv46}.name="omr_dst_bypass_${intf}_srcport" + set firewall.omr_dst_bypass_${intf}_srcport_udp_${ipv46}.name="omr_dst_bypass_${intf}_srcport_udp" set firewall.omr_dst_bypass_${intf}_srcport_udp_${ipv46}.proto='udp' set firewall.omr_dst_bypass_${intf}_srcport_udp_${ipv46}.src='lan' set firewall.omr_dst_bypass_${intf}_srcport_udp_${ipv46}.dest='*' @@ -685,16 +691,18 @@ _intf_rule() { set firewall.omr_dst_bypass_${intf}_srcport_udp_${ipv46}.enabled='0' set firewall.omr_dst_bypass_${intf}_srcport_udp_${ipv46}.set_xmark="0x${ipv46}539${count}" set firewall.omr_dst_bypass_${intf}_dstport_tcp_${ipv46}=rule - set firewall.omr_dst_bypass_${intf}_dstport_tcp_${ipv46}.name="omr_dst_bypass_${intf}_dstport" + set firewall.omr_dst_bypass_${intf}_dstport_tcp_${ipv46}.name="omr_dst_bypass_${intf}_dstport_tcp" set firewall.omr_dst_bypass_${intf}_dstport_tcp_${ipv46}.src='lan' set firewall.omr_dst_bypass_${intf}_dstport_tcp_${ipv46}.dest='*' set firewall.omr_dst_bypass_${intf}_dstport_tcp_${ipv46}.target='MARK' + set firewall.omr_dst_bypass_${intf}_dstport_tcp_${ipv46}.proto='tcp' set firewall.omr_dst_bypass_${intf}_dstport_tcp_${ipv46}.enabled='0' set firewall.omr_dst_bypass_${intf}_dstport_tcp_${ipv46}.set_xmark="0x${ipv46}539${count}" set firewall.omr_dst_bypass_${intf}_dstport_udp_${ipv46}=rule - set firewall.omr_dst_bypass_${intf}_dstport_udp_${ipv46}.name="omr_dst_bypass_${intf}_dstport" + set firewall.omr_dst_bypass_${intf}_dstport_udp_${ipv46}.name="omr_dst_bypass_${intf}_dstport_udp" set firewall.omr_dst_bypass_${intf}_dstport_udp_${ipv46}.src='lan' set firewall.omr_dst_bypass_${intf}_dstport_udp_${ipv46}.dest='*' + set firewall.omr_dst_bypass_${intf}_dstport_udp_${ipv46}.proto='udp' set firewall.omr_dst_bypass_${intf}_dstport_udp_${ipv46}.target='MARK' set firewall.omr_dst_bypass_${intf}_dstport_udp_${ipv46}.enabled='0' set firewall.omr_dst_bypass_${intf}_dstport_udp_${ipv46}.set_xmark="0x${ipv46}539${count}" diff --git a/openmptcprouter-api/files/bin/omr-ip-intf b/openmptcprouter-api/files/bin/omr-ip-intf index 1fffd1036d..b5a7076902 100755 --- a/openmptcprouter-api/files/bin/omr-ip-intf +++ b/openmptcprouter-api/files/bin/omr-ip-intf @@ -11,7 +11,7 @@ get_ip_from_server() { get_ip() { serverip=$1 getip="$(curl -s -k -4 -m ${timeout} --interface $intf https://$serverip:$serverport/clienthost)" - [ -n "$getip" ] && getip=$(echo $getip | jsonfilter -e '@.client_host') + [ -n "$getip" ] && getip=$(echo $getip | jsonfilter -e '@.client_host' | sed 's/::ffff://') if expr "$getip" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$' >/dev/null; then ip=$getip break