-
Notifications
You must be signed in to change notification settings - Fork 69
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 function to enable localhost communication only from env var #190
Conversation
Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.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.
How about to only offer a C function bool use_localhost_only()
? That satisfies the current use case. Also in case we want to extend the semantic in the future we can simply offer another function to return more complex information (which we haven't determined yet how they look and if things like a list of hostnames can be implemented across RMW impl.).
I wanted a third return option, that's why I didn't use the bool one, so proper behavior can be done if the variable has a wrong value. I guess I can remove the possibility to return the host list without parsing and just return the code. If we want |
Sounds good to me.
I am not sure how to name / value the three return codes for something like Instead of I would be worried that callers interpret the numeric return value as a boolean. So if Maybe a signature like [All this hops are only "necessary" because we try to use a env var with a wider value space than we are comfortable to actually specify atm. I still think just using an env var |
After reading the discussion in the issue, it seems that people by majority prefers the boolean rather than a list of hosts. So I'll make the changes accordingly! |
Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>
Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>
Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>
With the RMW API exposing the flag as an argument of the create node function (same as the domain ID) I would argue this function should actually be implemented in |
Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>
PR to implement network traffic restriction for localhost. There are no test yet since this is a mock open for implementation discussion. FastRTPS implementation