Commit cdbe0fa6 authored by Vitaly Lipatov's avatar Vitaly Lipatov

router: strip /32 suffix during resolve to deduplicate host routes

antifilter lists contain IPs with /32 suffix, other lists without. This caused duplicates in resolved file (1.1.1.1 vs 1.1.1.1/32). Strip /32 before sort -u to properly deduplicate. Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent fc0b9f7d
...@@ -377,7 +377,7 @@ process_routes() ...@@ -377,7 +377,7 @@ process_routes()
done | grep -v '^#' | grep -v '^$' | $resolve_func | \ done | grep -v '^#' | grep -v '^$' | $resolve_func | \
grep -v '^#' | grep -v '^$' grep -v '^#' | grep -v '^$'
fi fi
} | sort -u > "$resolved_new" } | sed 's|/32$||' | sort -u > "$resolved_new"
fi fi
# Check if resolved IPs actually changed # Check if resolved IPs actually changed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment