1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-12-26 01:59:53 +03:00

Merge pull request #1131 from Evengard/ppp-ipv6-fix

Fixes from review of PPP-IPv6 stack
This commit is contained in:
Ilya Shipitsin 2020-05-19 20:17:41 +05:00 committed by GitHub
commit 60cc784aee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2277,8 +2277,6 @@ UINT64 IPCIPv6GetServerEui(IPC *ipc)
if (LIST_NUM(ipc->IPv6RouterAdvs) == 0)
{
IP senderIP;
IPV6_ADDR senderV6;
IP destIP;
IPV6_ADDR destV6;
UCHAR destMacAddress[6];
@ -2301,10 +2299,9 @@ UINT64 IPCIPv6GetServerEui(IPC *ipc)
destMacAddress[1] = 0x33;
Copy(&destMacAddress[2], &destIP.ipv6_addr[12], sizeof(UINT));
IPToIPv6Addr(&senderV6, &senderIP);
IPToIPv6Addr(&destV6, &destIP);
packet = BuildICMPv6RouterSoliciation(&senderV6, &destV6, ipc->MacAddress, 0);
packet = BuildICMPv6RouterSoliciation(&linkLocal, &destV6, ipc->MacAddress, 0);
while (LIST_NUM(ipc->IPv6RouterAdvs) == 0)
{
@ -2444,12 +2441,14 @@ void IPCIPv6SendWithDestMacAddr(IPC *ipc, void *data, UINT size, UCHAR *dest_mac
p->ICMPv6HeaderPacketInfo.OptionList.SourceLinkLayer = &linkLayer;
}
Copy(p->ICMPv6HeaderPacketInfo.OptionList.SourceLinkLayer->Address, ipc->MacAddress, 6);
break;
case ICMPV6_TYPE_NEIGHBOR_ADVERTISEMENT:
if (p->ICMPv6HeaderPacketInfo.OptionList.TargetLinkLayer == NULL)
{
p->ICMPv6HeaderPacketInfo.OptionList.TargetLinkLayer = &linkLayer;
}
Copy(p->ICMPv6HeaderPacketInfo.OptionList.TargetLinkLayer->Address, ipc->MacAddress, 6);
break;
}
switch (p->ICMPv6HeaderPacketInfo.Type)
{