-
Epic
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
update E2 simulator to support source address binding
to add source-address binding for IPv4 (and IPv6) in the E2 simulator.
There's an issue with SCTP multi-homing. For some reason the kernel decides to send SCTP heartbeats to some of the addresses that the SCTP client originally sends. These are not valid IP addresses (in some docker/k8s environment) and things fail. The solution is to do source IP address binding in the source-side socket. I did this quickly for my environment by adding …
struct in_addr tmp_ip;
memset(&tmp_ip, 0, sizeof(struct in_addr));
struct sockaddr_in client4_addr;
if(inet_pton(AF_INET, "192.168.0.208", &tmp_ip) == 1)
{ client4_addr.sin_family = AF_INET; client4_addr.sin_port = htons(RIC_SCTP_SRC_PORT); client4_addr.sin_addr.s_addr = tmp_ip.s_addr; }
… right before these lines in “e2-interface/e2sim/src/SCTP/e2sim_sctp.cpp”
LOG_I("[SCTP] Binding client socket to source port %d", RIC_SCTP_SRC_PORT);
if(bind(client_fd, (struct sockaddr*)&client4_addr, sizeof(client4_addr)) == -1)
{ perror("bind"); exit(1); }Previously the code was using sockaddr_in6 and instead of a concrete IP addresses it used “in6addr_any”.