- Fix rule duplicate bug.

This commit is contained in:
2025-08-12 00:32:50 +02:00
parent 3250a88fda
commit 3bf29ef194

View File

@@ -947,7 +947,8 @@ function bridge_up
log_trace "Network" "Configure IP rule and routing [${bu_bridge_device}]..." log_trace "Network" "Configure IP rule and routing [${bu_bridge_device}]..."
${DEBUG} ip rule del from ${bu_peer_address} 2>/dev/null
${DEBUG} ip rule add from ${bu_peer_address} table ${bu_table} ${DEBUG} ip rule add from ${bu_peer_address} table ${bu_table}
for bu_tab in ${NETWORK_TABLE_LIST} for bu_tab in ${NETWORK_TABLE_LIST}
@@ -1118,8 +1119,12 @@ network_forward_start()
for src_id in ${NETWORK_SRC_ID_LIST} for src_id in ${NETWORK_SRC_ID_LIST}
do do
network_src_tab_get ${src_id} network_src_tab_get ${src_id}
${DEBUG} ip rule add from ${src_ip} table ${src_table} if [[ "${src_type}" != "0" ]]
then
${DEBUG} ip rule del from ${src_ip} 2>/dev/null
${DEBUG} ip rule add from ${src_ip} table ${src_table}
fi
if [[ "${src_port_range}" != "0" ]] if [[ "${src_port_range}" != "0" ]]
then then