mirror of
https://github.com/moonlight-stream/GS-IPv6-Forwarder.git
synced 2025-07-01 15:25:31 +00:00
Don't create pinholes for temporary addresses
This commit is contained in:
parent
d06627719b
commit
d4ff2b7bc7
@ -671,8 +671,8 @@ void UPnPCreatePinholesForInterface(struct UPNPUrls* urls, struct IGDdatas* data
|
|||||||
|
|
||||||
PSOCKADDR_IN6 currentAddrV6 = (PSOCKADDR_IN6)currentAddress->Address.lpSockaddr;
|
PSOCKADDR_IN6 currentAddrV6 = (PSOCKADDR_IN6)currentAddress->Address.lpSockaddr;
|
||||||
|
|
||||||
// Exclude link-local addresses
|
// Exclude link-local and privacy addresses
|
||||||
if (currentAddrV6->sin6_scope_id == 0) {
|
if (currentAddrV6->sin6_scope_id == 0 && currentAddress->SuffixOrigin != IpSuffixOriginRandom) {
|
||||||
char currentAddrStr[128] = {};
|
char currentAddrStr[128] = {};
|
||||||
|
|
||||||
inet_ntop(AF_INET6, ¤tAddrV6->sin6_addr, currentAddrStr, sizeof(currentAddrStr));
|
inet_ntop(AF_INET6, ¤tAddrV6->sin6_addr, currentAddrStr, sizeof(currentAddrStr));
|
||||||
@ -795,8 +795,8 @@ void UpdatePcpPinholes()
|
|||||||
|
|
||||||
PSOCKADDR_IN6 currentAddrV6 = (PSOCKADDR_IN6)currentAddress->Address.lpSockaddr;
|
PSOCKADDR_IN6 currentAddrV6 = (PSOCKADDR_IN6)currentAddress->Address.lpSockaddr;
|
||||||
|
|
||||||
// Exclude link-local addresses
|
// Exclude link-local and privacy addresses
|
||||||
if (currentAddrV6->sin6_scope_id == 0) {
|
if (currentAddrV6->sin6_scope_id == 0 && currentAddress->SuffixOrigin != IpSuffixOriginRandom) {
|
||||||
inet_ntop(AF_INET6, ¤tAddrV6->sin6_addr, addressStr, sizeof(addressStr));
|
inet_ntop(AF_INET6, ¤tAddrV6->sin6_addr, addressStr, sizeof(addressStr));
|
||||||
printf("Updating PCP mappings for address %s\n", addressStr);
|
printf("Updating PCP mappings for address %s\n", addressStr);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user