Commit f77f4287 authored by Laurent THOMAS's avatar Laurent THOMAS Committed by Robert Schmidt

Small optimization L2 to wireshark

the code creates a sink to read all traced packets and drop it.  but
this works only if we send to a local address and if there is not
another sink (like if we trace both UE and gNB in the same machine).
this sink's purpose is only to prevent to get automatic packets back
from the kernel saying "no listener". So, instead of killing the trace
when we can't create the sink (as done previously), we now just let the
trace in operation.
parent ccdabb4c
......@@ -254,7 +254,7 @@ int opt_create_listener_socket(char *ip_address, uint16_t port) {
LOG_E(OPT, "Failed to bind socket to (%s:%u): %s\n",
inet_ntoa(opt_listener.address.sin_addr),
ntohs(opt_listener.address.sin_port), strerror(errno));
opt_type = OPT_NONE;
// we log anyway as planned because other OAI process may have created the sink
close(opt_listener.sd);
opt_listener.sd = -1;
return -1;
......
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