udp_srcip defaulted to 127.0.0.1 for virtual servers

This commit is contained in:
maliakal_d 2022-02-15 10:48:14 +01:00
parent faa9ecf97c
commit c38f292613
2 changed files with 6 additions and 3 deletions

View File

@ -1675,7 +1675,7 @@ int setReadNRows(int value) {
}
if (isHardwareVersion2()) {
LOG(logERROR, ("Could not set number of rows. Only available for "
"Hardware Board version 2.0.\n"));
"Hardware Board version 2.0.\n"));
return FAIL;
}
@ -2175,7 +2175,7 @@ int getFlipRows() {
void setFlipRows(int arg) {
if (isHardwareVersion2()) {
LOG(logERROR, ("Could not set flip rows. Only available for "
"Hardware Board version 2.0.\n"));
"Hardware Board version 2.0.\n"));
return;
}
if (arg >= 0) {

View File

@ -37,6 +37,8 @@ const enum detectorType myDetectorType = GOTTHARD2;
const enum detectorType myDetectorType = GENERIC;
#endif
#define LOCALHOSTIP_INT 2130706433
// Global variables from communication_funcs
extern int lockStatus;
extern uint32_t lastClientIP;
@ -119,10 +121,11 @@ int printSocketReadError() {
}
void init_detector() {
memset(udpDetails, 0, sizeof(udpDetails));
#ifdef VIRTUAL
LOG(logINFO, ("This is a VIRTUAL detector\n"));
udpDetails[0].srcip = LOCALHOSTIP_INT;
#endif
memset(udpDetails, 0, sizeof(udpDetails));
udpDetails[0].srcport = DEFAULT_UDP_SRC_PORTNO;
udpDetails[0].dstport = DEFAULT_UDP_DST_PORTNO;
#ifdef EIGERD