Closed iyermi closed 11 months ago
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 30 days.
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 30 days.
A friendly reminder that this issue had no activity for 120 days.
This issue has been closed due to lack of activity.
The GetSockOpt() syscall handler (in syscalls/linux/sys_socket.go) can be improved to address varying lengths of data copies, including less than int-sized copies. Currently it relies on the binary.Size() of the returned buffer from netstack to CopyOut(). This forces the netstack handlers to handle different size cases separately for each option, which otherwise can be handled by the caller across all options.
This helps with keeping up with Linux parity as in net/ipv6/ipv6_sockglue.c::do_ipv6_getsockopt() and net/ipv4/ip_sockglue.c::do_ip_getsockopt().