File tree Expand file tree Collapse file tree
src/module/scripts/network Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1440,11 +1440,12 @@ setup_redirect_chain6() {
14401440setup_routing4 () {
14411441 log Info " Setting up routing rules for IPv4"
14421442
1443+ ip_rule del fwmark " $MARK_VALUE " table " $TABLE_ID " pref " $TABLE_ID " 2> /dev/null
14431444 ip_rule add fwmark " $MARK_VALUE " table " $TABLE_ID " pref " $TABLE_ID " || {
14441445 log Error " Failed to add IPv4 routing rule"
14451446 return 1
14461447 }
1447- ip_route add local 0.0.0.0/0 dev lo table " $TABLE_ID " || {
1448+ ip_route replace local 0.0.0.0/0 dev lo table " $TABLE_ID " || {
14481449 log Error " Failed to add IPv4 route"
14491450 return 1
14501451 }
@@ -1458,11 +1459,12 @@ setup_routing4() {
14581459setup_routing6 () {
14591460 log Info " Setting up routing rules for IPv6"
14601461
1462+ ip6_rule del fwmark " $MARK_VALUE6 " table " $TABLE_ID " pref " $TABLE_ID " 2> /dev/null
14611463 ip6_rule add fwmark " $MARK_VALUE6 " table " $TABLE_ID " pref " $TABLE_ID " || {
14621464 log Error " Failed to add IPv6 routing rule"
14631465 return 1
14641466 }
1465- ip6_route add local ::/0 dev lo table " $TABLE_ID " || {
1467+ ip6_route replace local ::/0 dev lo table " $TABLE_ID " || {
14661468 log Error " Failed to add IPv6 route"
14671469 return 1
14681470 }
You can’t perform that action at this time.
0 commit comments