`OvsGetOrResolveIPNeigh` uses a stack over 1024 bytes.
Switch one parameter to be a pointer.
Found using WDK 8.1 static code analysis.
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Shashank Ram <rams@vmware.com>
-OvsGetOrResolveIPNeigh(MIB_IF_ROW2 ipRow,
+OvsGetOrResolveIPNeigh(PMIB_IF_ROW2 ipRow,
UINT32 ipAddr,
PMIB_IPNET_ROW2 ipNeigh)
{
UINT32 ipAddr,
PMIB_IPNET_ROW2 ipNeigh)
{
ASSERT(ipNeigh);
RtlZeroMemory(ipNeigh, sizeof (*ipNeigh));
ASSERT(ipNeigh);
RtlZeroMemory(ipNeigh, sizeof (*ipNeigh));
- ipNeigh->InterfaceLuid.Value = ipRow.InterfaceLuid.Value;
- ipNeigh->InterfaceIndex = ipRow.InterfaceIndex;
+ ipNeigh->InterfaceLuid.Value = ipRow->InterfaceLuid.Value;
+ ipNeigh->InterfaceIndex = ipRow->InterfaceIndex;
ipNeigh->Address.si_family = AF_INET;
ipNeigh->Address.Ipv4.sin_addr.s_addr = ipAddr;
ipNeigh->Address.si_family = AF_INET;
ipNeigh->Address.Ipv4.sin_addr.s_addr = ipAddr;
if (status != STATUS_SUCCESS) {
RtlZeroMemory(ipNeigh, sizeof (*ipNeigh));
if (status != STATUS_SUCCESS) {
RtlZeroMemory(ipNeigh, sizeof (*ipNeigh));
- ipNeigh->InterfaceLuid.Value = ipRow.InterfaceLuid.Value;
- ipNeigh->InterfaceIndex = ipRow.InterfaceIndex;
+ ipNeigh->InterfaceLuid.Value = ipRow->InterfaceLuid.Value;
+ ipNeigh->InterfaceIndex = ipRow->InterfaceIndex;
ipNeigh->Address.si_family = AF_INET;
ipNeigh->Address.Ipv4.sin_addr.s_addr = ipAddr;
status = OvsResolveIPNeighEntry(ipNeigh);
ipNeigh->Address.si_family = AF_INET;
ipNeigh->Address.Ipv4.sin_addr.s_addr = ipAddr;
status = OvsResolveIPNeighEntry(ipNeigh);
if (ipAddr == 0) {
ipAddr = request->fwdReq.tunnelKey.dst;
}
if (ipAddr == 0) {
ipAddr = request->fwdReq.tunnelKey.dst;
}
- status = OvsGetOrResolveIPNeigh(instance->internalRow,
+ status = OvsGetOrResolveIPNeigh(&instance->internalRow,
ipAddr, &ipNeigh);
if (status != STATUS_SUCCESS) {
ExReleaseResourceLite(&instance->lock);
ipAddr, &ipNeigh);
if (status != STATUS_SUCCESS) {
ExReleaseResourceLite(&instance->lock);
MIB_IPNET_ROW2 ipNeigh;
NTSTATUS status;
POVS_IPHELPER_INSTANCE instance = (POVS_IPHELPER_INSTANCE)ipn->context;
MIB_IPNET_ROW2 ipNeigh;
NTSTATUS status;
POVS_IPHELPER_INSTANCE instance = (POVS_IPHELPER_INSTANCE)ipn->context;
- MIB_IF_ROW2 internalRow = instance->internalRow;
NdisReleaseSpinLock(&ovsIpHelperLock);
ExAcquireResourceExclusiveLite(&ovsInstanceListLock, TRUE);
NdisReleaseSpinLock(&ovsIpHelperLock);
ExAcquireResourceExclusiveLite(&ovsInstanceListLock, TRUE);
- status = OvsGetOrResolveIPNeigh(internalRow,
+ status = OvsGetOrResolveIPNeigh(&instance->internalRow,
ipAddr, &ipNeigh);
OvsUpdateIPNeighEntry(ipAddr, &ipNeigh, status);
ipAddr, &ipNeigh);
OvsUpdateIPNeighEntry(ipAddr, &ipNeigh, status);