Set optlen for UDP-encap check in XfrmController

When setting the socket owner for an encap socket XfrmController will
first attempt to verify that the socket has the UDP-encap socket option
set. When doing so it would pass in an uninitialized optlen parameter
which could cause the call to not modify the option value if the optlen
happened to be too short. So for example if the stack happened to
contain a zero where optlen was located the check would fail and the
socket owner would not be changed.

Fix this by setting optlen to the size of the option value parameter.

Test: run cts -m CtsNetTestCases
BUG: 111650288
Change-Id: I57b6e9dba09c1acda71e3ec2084652e961667bd9
(cherry picked from commit fc42a105147310bd680952d4b71fe32974bd8506)
diff --git a/server/XfrmController.cpp b/server/XfrmController.cpp
index b9a5a41..6f7bf2f 100644
--- a/server/XfrmController.cpp
+++ b/server/XfrmController.cpp
@@ -436,7 +436,7 @@
     }
 
     int optval;
-    socklen_t optlen;
+    socklen_t optlen = sizeof(optval);
     netdutils::Status status =
         getSyscallInstance().getsockopt(Fd(socket), IPPROTO_UDP, UDP_ENCAP, &optval, &optlen);
     if (status != netdutils::status::ok) {