更新倒表方式
This commit is contained in:
@@ -36,11 +36,11 @@ add_rules() {
|
||||
current_prio=$((current_prio + 2))
|
||||
done
|
||||
|
||||
ip rule add from ${LAN_SUBNET_V4} to ${LAN_SUBNET_V4} lookup 105 priority ${current_prio} 2>/dev/null
|
||||
ip rule add from ${LAN_SUBNET_V4} to ${LAN_SUBNET_V4} lookup 102 priority ${current_prio} 2>/dev/null
|
||||
current_prio=$((current_prio + 10))
|
||||
|
||||
ip -6 rule add from ${TUNNEL_SUBNET_V6} to ${TUNNEL_SUBNET_V6} lookup 102 priority ${BASE_PRIORITY} 2>/dev/null
|
||||
ip -6 rule add from ${LAN_SUBNET_V6_FD} to ${LAN_SUBNET_V6_FD} lookup 105 priority $((BASE_PRIORITY + 10)) 2>/dev/null
|
||||
ip -6 rule add from ${LAN_SUBNET_V6_FD} to ${LAN_SUBNET_V6_FD} lookup 102 priority $((BASE_PRIORITY + 10)) 2>/dev/null
|
||||
}
|
||||
|
||||
del_rules() {
|
||||
@@ -51,11 +51,11 @@ del_rules() {
|
||||
current_prio=$((current_prio + 2))
|
||||
done
|
||||
|
||||
ip rule del from ${LAN_SUBNET_V4} to ${LAN_SUBNET_V4} lookup 105 priority ${current_prio} 2>/dev/null
|
||||
ip rule del from ${LAN_SUBNET_V4} to ${LAN_SUBNET_V4} lookup 102 priority ${current_prio} 2>/dev/null
|
||||
current_prio=$((current_prio + 10))
|
||||
|
||||
ip -6 rule del from ${TUNNEL_SUBNET_V6} to ${TUNNEL_SUBNET_V6} lookup 102 priority ${BASE_PRIORITY} 2>/dev/null
|
||||
ip -6 rule del from ${LAN_SUBNET_V6_FD} to ${LAN_SUBNET_V6_FD} lookup 105 priority $((BASE_PRIORITY + 10)) 2>/dev/null
|
||||
ip -6 rule del from ${LAN_SUBNET_V6_FD} to ${LAN_SUBNET_V6_FD} lookup 102 priority $((BASE_PRIORITY + 10)) 2>/dev/null
|
||||
}
|
||||
|
||||
start() {
|
||||
|
||||
Reference in New Issue
Block a user