13627105546 opened a new pull request, #17875: URL: https://github.com/apache/nuttx/pull/17875
Remove the interception of unknown levels and option names in sim usrsock. This allows the system socket interface to handle them and return the correct error codes or behavior, rather than returning a generic error locally. *Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## Summary This change removes the local interception of unknown socket levels and option names in the sim usrsock implementation. Previously, the code would trap unsupported levels or options and return a generic error code locally. This behavior prevented the underlying system interfaces (when using `sim`) from handling these options or returning the correct system-level error codes. By removing this interception, `getsockopt` and `setsockopt` calls are passed through to the system, allowing for correct error reporting and handling of options supported by the host system but not explicitly mapped by the simulation layer. ## Impact * **Impact on user**: `getsockopt` and `setsockopt` on the simulator will now behave more consistently with the host system's network stack, returning accurate error codes for unsupported options instead of generic internal errors. * **Backward compatibility**: Yes. * **New feature**: No, bug fix. ## Testing * **Target**: `sim:usrsock` * **Verification**: * Verified that calling `getsockopt`/`setsockopt` with options not explicitly handled by NuttX's `usrsock` shim now correctly propagates the return value from the host system's socket API. * Passed `tools/checkpatch.sh`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
