fix for jungfrau virtual rr

This commit is contained in:
maliakal_d 2021-08-30 14:51:56 +02:00
parent 040aaec378
commit 6a8eafaa67
2 changed files with 4 additions and 2 deletions

View File

@ -1465,6 +1465,7 @@ int configureMAC() {
LOG(logINFO, ("\tInterface : %d %s\n\n", selInterface, LOG(logINFO, ("\tInterface : %d %s\n\n", selInterface,
(selInterface ? "Inner" : "Outer"))); (selInterface ? "Inner" : "Outer")));
LOG(logINFO, ("Number of entries: %d\n", numUdpDestinations));
for (int iRxEntry = 0; iRxEntry != MAX_UDP_DESTINATION; ++iRxEntry) { for (int iRxEntry = 0; iRxEntry != MAX_UDP_DESTINATION; ++iRxEntry) {
uint32_t srcip = udpDetails[iRxEntry].srcip; uint32_t srcip = udpDetails[iRxEntry].srcip;
uint32_t srcip2 = udpDetails[iRxEntry].srcip2; uint32_t srcip2 = udpDetails[iRxEntry].srcip2;
@ -1531,9 +1532,7 @@ int configureMAC() {
iRxEntry)); iRxEntry));
return FAIL; return FAIL;
} }
return OK;
#endif #endif
if (numInterfaces == 2) { if (numInterfaces == 2) {
// bottom // bottom
setupHeader(iRxEntry, OUTER, dstip, dstmac, dstport, srcmac, srcip, setupHeader(iRxEntry, OUTER, dstip, dstmac, dstport, srcmac, srcip,

View File

@ -33,6 +33,9 @@ int getUdPSocketDescriptor(int iRxEntry, int index) { return udpSockfd[iRxEntry]
int setUDPDestinationDetails(int iRxEntry, int index, const char *ip, int setUDPDestinationDetails(int iRxEntry, int index, const char *ip,
unsigned short int port) { unsigned short int port) {
LOG(logDEBUG1,
("Setting udp destination details for socket %d [iRxEntry:%d]\n", index,
iRxEntry));
udpDestinationPort[iRxEntry][index] = port; udpDestinationPort[iRxEntry][index] = port;
size_t len = strlen(ip); size_t len = strlen(ip);
memset(udpDestinationIp[iRxEntry][index], 0, INET_ADDRSTRLEN); memset(udpDestinationIp[iRxEntry][index], 0, INET_ADDRSTRLEN);