This code is effectively dead code. SO_PEERCRED is a getsockopt
call not *setsockopt* call. Additionally we are not doing
anything with the failed setsockopt call at all.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
static int zebra_mlag_connect(struct thread *thread)
{
struct sockaddr_un svr = {0};
- struct ucred ucred;
- socklen_t len = 0;
/* Reset the Timer-running flag */
zrouter.mlag_info.timer_running = false;
&zrouter.mlag_info.t_read);
return 0;
}
- len = sizeof(struct ucred);
- ucred.pid = getpid();
set_nonblocking(mlag_socket);
- setsockopt(mlag_socket, SOL_SOCKET, SO_PEERCRED, &ucred, len);
if (IS_ZEBRA_DEBUG_MLAG)
zlog_debug("%s: Connection with MLAG is established ",