Skip to content

Add config options to disable some root only features#471

Open
Paliak wants to merge 4 commits into
schweikert:developfrom
Paliak:non-root-config-options
Open

Add config options to disable some root only features#471
Paliak wants to merge 4 commits into
schweikert:developfrom
Paliak:non-root-config-options

Conversation

@Paliak
Copy link
Copy Markdown

@Paliak Paliak commented May 17, 2026

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.

Signed-off-by: Paliak <91493239+Paliak@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread configure.ac Outdated
Comment thread src/socket4.c Outdated
@Paliak
Copy link
Copy Markdown
Author

Paliak commented May 17, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/socket6.c Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant