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

sync #535

Merged
merged 5 commits into from
Aug 29, 2024
Merged

sync #535

Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions omr-6in4/files/etc/init.d/omr-6in4
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ set_ipv6_state() {
sed -i "s:^net.ipv6.conf.all.disable_ipv6=[0-9]*::" /etc/sysctl.d/zzz_openmptcprouter.conf
sysctl -qw net.ipv6.conf.all.disable_ipv6=0

uci -q batch <<-EOF >/dev/null
set firewall.@defaults[0].disable_ipv6=$disable_ipv6
commit firewall
EOF
#uci -q batch <<-EOF >/dev/null
# set firewall.@defaults[0].disable_ipv6=$disable_ipv6
# commit firewall
#EOF

if [ "$disable_ipv6" = "1" ]; then
logger -t "omr-6in4" "Disable IPv6"
Expand Down
6 changes: 3 additions & 3 deletions omr-dscp/files/etc/init.d/omr-dscp-nft
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ _add_dscp_rules() {
src_port="$(echo $src_port | sed 's/,/ /g')"
dest_port="$(echo $dest_port | sed 's/,/ /g')"
for port in $src_port; do
uci -q add_list firewall.omr_dscp_rule$count.src_port="$src_port"
uci -q add_list firewall.omr_dscp_rule$count.src_port="$port"
done
for port in $src_port; do
uci -q add_list firewall.omr_dscp_rule$count.dest_port="$dest_port"
for port in $dest_port; do
uci -q add_list firewall.omr_dscp_rule$count.dest_port="$port"
done
#_add_dscp_rule -m multiport --sports "$src_port" -m multiport --dports "$dest_port"
uci -q commit firewall
Expand Down
3 changes: 2 additions & 1 deletion omr-tracker/files/bin/omr-tracker
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ while true; do
}

if [ -n "$OMR_TRACKER_DEVICE" ] && [ -d "/sys/class/net/$OMR_TRACKER_DEVICE" ]; then
if [ -n "$(ip link show $OMR_TRACKER_DEVICE | grep 'state UP')" ] || [ -n "$(ip link show $OMR_TRACKER_DEVICE | grep 'state UNKNOWN')" ]; then
#if [ -n "$(ip link show $OMR_TRACKER_DEVICE | grep 'state UP')" ] || [ -n "$(ip link show $OMR_TRACKER_DEVICE | grep 'state UNKNOWN')" ]; then
if [ "$(ifstatus $OMR_TRACKER_INTERFACE | jsonfilter -e '@.up')" == "true" ] || [ "$OMR_TRACKER_INTERFACE" = "omrvpn" ]; then
# retrieve iface ip and gateway
if { [ "$OMR_TRACKER_FAMILY" = "ipv4" ] || [ "$OMR_TRACKER_FAMILY" = "ipv4ipv6" ]; } && [ "$OMR_TRACKER_INTERFACE_PROTO" != "dhcpv6" ]; then
OMR_TRACKER_DEVICE_IP=$(ip -4 -br addr ls dev "$OMR_TRACKER_DEVICE" | awk -F'[ /]+' '{print $3}')
Expand Down
1 change: 1 addition & 0 deletions openmptcprouter/files/etc/init.d/mptcpovervpn
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ mptcp_over_vpn() {
set openvpn.${interface}.proto='udp'
set openvpn.${interface}.client='1'
set openvpn.${interface}.enabled='1'
set openvpn.${interface}.disable_dco='1'
set openvpn.${interface}.allow_recursive_routing='1'
set openvpn.${interface}.key='/etc/luci-uploads/client.key'
set openvpn.${interface}.cert='/etc/luci-uploads/client.crt'
Expand Down
10 changes: 6 additions & 4 deletions openmptcprouter/files/etc/uci-defaults/1980-omr-firewall
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ if [ "$(uci -q get firewall.omr_server)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set firewall.omr_server=include
set firewall.omr_server.path=/etc/firewall.omr-server
set firewall.omr_server.reload=1
commit firewall
EOF
fi
Expand All @@ -149,15 +148,13 @@ if [ "$(uci -q get firewall.gre_tunnel)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set firewall.gre_tunnel=include
set firewall.gre_tunnel.path=/etc/firewall.gre-tunnel
set firewall.gre_tunnel.reload=0
commit firewall
EOF
fi
if [ "$(uci -q get firewall.ttl)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set firewall.ttl=include
set firewall.ttl.path=/etc/firewall.ttl
set firewall.ttl.reload=1
commit firewall
EOF
fi
Expand Down Expand Up @@ -242,7 +239,6 @@ done
uci -q batch <<-EOF >/dev/null
set firewall.zone_lan.mtu_fix='1'
set firewall.zone_vpn.mtu_fix='1'
set firewall.@include[0].reload='1'
commit firewall
EOF
if [ -z "$(uci -q get openmptcprouter.settings.sipalg)" ]; then
Expand Down Expand Up @@ -271,6 +267,12 @@ fi
# Remove mtu_fix check, doesn't work on kernel 6.6
sed -i 's/if (zone\.mtu_fix && this\.kernel < 0x040a0000) {/if (zone.mtu_fix \&\& this.kernel < 0x040a0000 \&\& false) {/' /usr/share/ucode/fw4.uc

uci -q batch <<-EOF >/dev/null
del firewall.omr_server.reload
del firewall.gre_tunnel.reload
del firewall.ttl.reload
EOF

rm -f /tmp/luci-indexcache

exit 0