From 5206374bcd1d79a85ca6c6eba14b4674420a7915 Mon Sep 17 00:00:00 2001 From: dmjohn-marvell <50865274+dmjohn-marvell@users.noreply.github.com> Date: Wed, 19 Jun 2019 21:17:39 +0530 Subject: [PATCH] [sonic-swss]: Fix for FPM accept call failure in ARM arch (#925) --- fpmsyncd/fpmlink.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fpmsyncd/fpmlink.cpp b/fpmsyncd/fpmlink.cpp index df59d0af85d4..2147f85d7dfe 100644 --- a/fpmsyncd/fpmlink.cpp +++ b/fpmsyncd/fpmlink.cpp @@ -71,7 +71,10 @@ FpmLink::~FpmLink() void FpmLink::accept() { struct sockaddr_in client_addr; - socklen_t client_len; + + // Ref: man 3 accept + // address_len argument, on input, specifies the length of the supplied sockaddr structure + socklen_t client_len = sizeof(struct sockaddr_in); m_connection_socket = ::accept(m_server_socket, (struct sockaddr *)&client_addr, &client_len);