Fix route_address_set duplicated IP sets causing route creation failure

This commit is contained in:
Ofek Lev
2026-08-05 02:13:43 -04:00
committed by GitHub
parent af40956e58
commit 4c02326989

View File

@@ -301,7 +301,6 @@ func (t *Inbound) Start(stage adapter.StartStage) error {
t.tunOptions.Name = tun.CalculateInterfaceName("") t.tunOptions.Name = tun.CalculateInterfaceName("")
} }
if t.platformInterface == nil { if t.platformInterface == nil {
t.routeAddressSet = common.FlatMap(t.routeRuleSet, adapter.RuleSet.ExtractIPSet)
for _, routeRuleSet := range t.routeRuleSet { for _, routeRuleSet := range t.routeRuleSet {
ipSets := routeRuleSet.ExtractIPSet() ipSets := routeRuleSet.ExtractIPSet()
if len(ipSets) == 0 { if len(ipSets) == 0 {
@@ -313,7 +312,6 @@ func (t *Inbound) Start(stage adapter.StartStage) error {
t.routeRuleSetCallback = append(t.routeRuleSetCallback, routeRuleSet.RegisterCallback(t.updateRouteAddressSet)) t.routeRuleSetCallback = append(t.routeRuleSetCallback, routeRuleSet.RegisterCallback(t.updateRouteAddressSet))
} }
} }
t.routeExcludeAddressSet = common.FlatMap(t.routeExcludeRuleSet, adapter.RuleSet.ExtractIPSet)
for _, routeExcludeRuleSet := range t.routeExcludeRuleSet { for _, routeExcludeRuleSet := range t.routeExcludeRuleSet {
ipSets := routeExcludeRuleSet.ExtractIPSet() ipSets := routeExcludeRuleSet.ExtractIPSet()
if len(ipSets) == 0 { if len(ipSets) == 0 {