Add config options to disable some root only features#471
Conversation
Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request introduces build-time configuration options to disable raw sockets and fwmark support, updating the socket creation logic in socket4.c and socket6.c to respect these flags. The reviewer identified significant issues in configure.ac, including redundant definitions and logic that ignores the user's choice to disable raw sockets. Additionally, the socket initialization code was flagged for being brittle due to the use of preprocessor directives across control flow statements and for having inconsistent indentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces build-time configuration options to enable or disable raw sockets and firewall marks. It adds checks for SOCK_DGRAM support in the build system and uses new preprocessor definitions to conditionally compile socket creation and command-line options in fping.c, socket4.c, and socket6.c. Feedback was provided regarding src/socket6.c to fix inconsistent indentation and to use a more idiomatic file descriptor check for consistency with other parts of the project.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Adds config options to disable SO_MARK and SOCK_RAW support during compilation. My main use for this is compiling for non rooted Android where i won't be able to use these features either way so an option to not have them baked in is nice.