mirror of
https://codeberg.org/slatian/service.echoip-slatecave.git
synced 2025-01-14 20:47:09 +01:00
Fixed bug where global adresses wre classified as having an unknown scope
This commit is contained in:
parent
70f06ac501
commit
5a27eb793d
@ -61,6 +61,8 @@ impl AddressInfo {
|
|||||||
} else if addr.is_broadcast() {
|
} else if addr.is_broadcast() {
|
||||||
address_cast = AddressCast::Broadcast;
|
address_cast = AddressCast::Broadcast;
|
||||||
address_scope = AddressScope::LinkLocal;
|
address_scope = AddressScope::LinkLocal;
|
||||||
|
} else {
|
||||||
|
address_scope = AddressScope::Global;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
IpAddr::V6(addr) => {
|
IpAddr::V6(addr) => {
|
||||||
@ -88,6 +90,8 @@ impl AddressInfo {
|
|||||||
0 | 3 | 0xf => address_scope = AddressScope::Reserved,
|
0 | 3 | 0xf => address_scope = AddressScope::Reserved,
|
||||||
_ => address_scope = AddressScope::Unknown,
|
_ => address_scope = AddressScope::Unknown,
|
||||||
}
|
}
|
||||||
|
} else if segments[0] & 0xe000 == 0x2000 {
|
||||||
|
address_scope = AddressScope::Global;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user