mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
Fixes from review of PPP-IPv6 stack
This commit is contained in:
parent
1a8e1385cf
commit
b77dd167ff
@ -2277,8 +2277,6 @@ UINT64 IPCIPv6GetServerEui(IPC *ipc)
|
|||||||
|
|
||||||
if (LIST_NUM(ipc->IPv6RouterAdvs) == 0)
|
if (LIST_NUM(ipc->IPv6RouterAdvs) == 0)
|
||||||
{
|
{
|
||||||
IP senderIP;
|
|
||||||
IPV6_ADDR senderV6;
|
|
||||||
IP destIP;
|
IP destIP;
|
||||||
IPV6_ADDR destV6;
|
IPV6_ADDR destV6;
|
||||||
UCHAR destMacAddress[6];
|
UCHAR destMacAddress[6];
|
||||||
@ -2301,10 +2299,9 @@ UINT64 IPCIPv6GetServerEui(IPC *ipc)
|
|||||||
destMacAddress[1] = 0x33;
|
destMacAddress[1] = 0x33;
|
||||||
Copy(&destMacAddress[2], &destIP.ipv6_addr[12], sizeof(UINT));
|
Copy(&destMacAddress[2], &destIP.ipv6_addr[12], sizeof(UINT));
|
||||||
|
|
||||||
IPToIPv6Addr(&senderV6, &senderIP);
|
|
||||||
IPToIPv6Addr(&destV6, &destIP);
|
IPToIPv6Addr(&destV6, &destIP);
|
||||||
|
|
||||||
packet = BuildICMPv6RouterSoliciation(&senderV6, &destV6, ipc->MacAddress, 0);
|
packet = BuildICMPv6RouterSoliciation(&linkLocal, &destV6, ipc->MacAddress, 0);
|
||||||
|
|
||||||
while (LIST_NUM(ipc->IPv6RouterAdvs) == 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;
|
p->ICMPv6HeaderPacketInfo.OptionList.SourceLinkLayer = &linkLayer;
|
||||||
}
|
}
|
||||||
Copy(p->ICMPv6HeaderPacketInfo.OptionList.SourceLinkLayer->Address, ipc->MacAddress, 6);
|
Copy(p->ICMPv6HeaderPacketInfo.OptionList.SourceLinkLayer->Address, ipc->MacAddress, 6);
|
||||||
|
break;
|
||||||
case ICMPV6_TYPE_NEIGHBOR_ADVERTISEMENT:
|
case ICMPV6_TYPE_NEIGHBOR_ADVERTISEMENT:
|
||||||
if (p->ICMPv6HeaderPacketInfo.OptionList.TargetLinkLayer == NULL)
|
if (p->ICMPv6HeaderPacketInfo.OptionList.TargetLinkLayer == NULL)
|
||||||
{
|
{
|
||||||
p->ICMPv6HeaderPacketInfo.OptionList.TargetLinkLayer = &linkLayer;
|
p->ICMPv6HeaderPacketInfo.OptionList.TargetLinkLayer = &linkLayer;
|
||||||
}
|
}
|
||||||
Copy(p->ICMPv6HeaderPacketInfo.OptionList.TargetLinkLayer->Address, ipc->MacAddress, 6);
|
Copy(p->ICMPv6HeaderPacketInfo.OptionList.TargetLinkLayer->Address, ipc->MacAddress, 6);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
switch (p->ICMPv6HeaderPacketInfo.Type)
|
switch (p->ICMPv6HeaderPacketInfo.Type)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user