mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 10:14:35 +00:00
fix: allow self virtual IP loopback (#2161)
This commit is contained in:
@@ -1657,8 +1657,12 @@ impl PeerManager {
|
||||
|
||||
#[cfg(not(target_env = "ohos"))]
|
||||
{
|
||||
if not_send_to_self && *peer_id == self.my_peer_id {
|
||||
// the packet may be sent to vpn portal, so we just set flags instead of drop it
|
||||
if not_send_to_self
|
||||
&& *peer_id == self.my_peer_id
|
||||
&& !self.global_ctx.is_ip_local_virtual_ip(&ip_addr)
|
||||
{
|
||||
// Keep the loop-prevention flags for proxy-induced self-delivery where
|
||||
// the destination is not this node's own virtual IP.
|
||||
hdr.set_not_send_to_tun(true);
|
||||
hdr.set_no_proxy(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user