-
Notifications
You must be signed in to change notification settings - Fork 39
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
Allow loopback network interface monitoring. #220
Allow loopback network interface monitoring. #220
Conversation
Add a new mptcpd_nm_monitor_loopback() function that allows the user to enable monitoring of loopback network interfaces. Monitoring of loopback network interfaces is meant primarily for testing purposes. Mptcpd will retain the previous behavior of only monitoring non-loopback network interfaces by default.
Enable loopback network interface monitoring to allow the test-network-monitor unit test succeed in cases where non-loopback interfaces are unavailable, such as in a sandboxed environment. Fixes #208.
Expected Loopback Network Interface Monitoring Disabled
Loopback Network Interface Monitoring Enabled
Notice the loopback interface and address dump. |
Pull Request Test Coverage Report for Build 1860521727Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of questions inline
Optimize for the common case by reordering the loopback filtering to be checked first. Co-authored-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not set up to test this directly, but looks good to me.
Verified with non-loopback interface down:
|
Add a new
mptcpd_nm_monitor_loopback()
function that allows the user to enable monitoring of loopback network interfaces. Monitoring of loopback network interfaces is meant primarily for testing purposes. Mptcpd will retain the previous behavior of only monitoring non-loopback network interfaces by default.Fixes #208.