Aufgrund einer Wartung wird GitLab am 19.10. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 19.10. between 8:00 and 9:00 am.

Commit 844e5429 authored by Jean Meurice's avatar Jean Meurice
Browse files

Network fix

parent 5c046f34
Pipeline #400585 passed with stage
in 9 minutes and 26 seconds
......@@ -245,6 +245,7 @@ public class DynamicInterfaceGenerator {
}
portInf.direction = PortDirection.IO;
portInf.addTag("network");
}
}
......
......@@ -176,11 +176,12 @@ int get_socket_id(PacketReader &input_packet, int max_count) {
if (ip.find("2::") != 0) {
cerr << "Unsupported IP: '"<< ip << "' (only supports 'N-to-N' IPs with '2::' prefix)" << endl;
}
int id = strtol(ip.c_str()+3, nullptr, 10);
int id = strtol(ip.c_str()+3, nullptr, 10)-1;
if (id >= max_count) {
cerr << "'N-to-N' IP '" << ip << "' outside of range [1:"<< (max_count+1) << "]. Ignoring packet." << endl;
cerr << "'N-to-N' IP '" << ip << "' outside of range [1:"<< (max_count) << "]. Ignoring packet." << endl;
return -1;
}
return id;
}
void SimulationSession::set_input(PacketReader &input_packet) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment