Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --fwmark option for Linux #289

Merged
merged 1 commit into from
Jan 8, 2024
Merged

Conversation

deepkv
Copy link
Contributor

@deepkv deepkv commented Dec 15, 2023

This is based on tomangert's original outdated pull request.

--fwmark can be used in conjunction with ip rule and ip route to route ping packets based on the mark set by the aforementioned flag.

This has been supported by Linux since kernel version 2.6.25

Let me know if you'd like any changes.

@deepkv deepkv marked this pull request as draft December 18, 2023 16:04
@deepkv deepkv marked this pull request as ready for review December 18, 2023 16:04
@deepkv deepkv force-pushed the develop branch 2 times, most recently from 16f9fd4 to 357f2e7 Compare December 20, 2023 10:11
@coveralls
Copy link

coveralls commented Dec 20, 2023

Coverage Status

coverage: 81.69% (+0.1%) from 81.581%
when pulling c0cdb52 on deepkv:develop
into a3f4c57 on schweikert:develop.

@schweikert
Copy link
Owner

Thanks for your contribution!

Could you add a simple test to check at least that the program doesn't crash when --fwmark is passed? Pinging 12.0.0.7 is fine, and you don't need to check that the fwmark was actually set (that would be hard to do).

Also, please update doc/fping.pod (the man-page).

@deepkv
Copy link
Contributor Author

deepkv commented Dec 20, 2023

Thanks for the review! Done.

@deepkv deepkv force-pushed the develop branch 2 times, most recently from 5588d31 to 5ad290a Compare December 20, 2023 13:50
@deepkv deepkv marked this pull request as draft December 21, 2023 19:42
@deepkv
Copy link
Contributor Author

deepkv commented Dec 23, 2023

Apologies, it looks like setcap doesn't work in GitHub CI, which made the test fail. I've now used sudo instead. I believe it should work now.

@deepkv deepkv marked this pull request as ready for review December 23, 2023 15:45
@deepkv deepkv force-pushed the develop branch 2 times, most recently from 54e5165 to 2d6cf95 Compare December 23, 2023 15:59
@deepkv deepkv marked this pull request as draft December 23, 2023 15:59
@deepkv
Copy link
Contributor Author

deepkv commented Dec 23, 2023

Update: the tests finally pass in GitHub CI in my repo after a couple more iterations. Thanks for your patience.

@deepkv deepkv marked this pull request as ready for review December 23, 2023 16:06
@schweikert schweikert merged commit c8e9632 into schweikert:develop Jan 8, 2024
7 of 9 checks passed
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.

3 participants