-
Notifications
You must be signed in to change notification settings - Fork 925
dnsdist: Add local ComboAddress parameter for SBind() at TeeAction() #11889
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
Conversation
Uasge: `addAction(AllRule(), TeeAction("192.0.2.54", false, "192.0.2.53"))` In which case, "192.0.2.54" is the ComboAddress of receiver, "192.0.2.53" is the ComboAddress of sender. Signed-off-by: FredericDT <frederic.dt.twh@gmail.com>
keywords Signed-off-by: FredericDT <frederic.dt.twh@gmail.com>
I think there is need to have an extra boolean flag, a |
Sounds good, I think there are two options:
I prefer the second way. |
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.
Thanks for that pull request! I have made a few suggestions but nothing big, the code looks good.
boost::optional<ComboAddress> instead. According to PowerDNS#11889 > An extra boolean flag is no needed for boost::optional<x> Thanks Moerbeek and Gacogne Signed-off-by: FredericDT <frederic.dt.twh@gmail.com>
The optional parameter `local` shall be added in version 1.8.0 Signed-off-by: FredericDT <frederic.dt.twh@gmail.com>
Accoding to PowerDNS#11889 > rgacogne > Since we only use the local address in the constructor, I don't think we need to keep it around? > > FredericDT > Possibly using that d_local in statistical function? > > rgacogne > I would prefer not keeping it for now, we can always add it back later when we actually decide to do something with it :) Signed-off-by: FredericDT <frederic.dt.twh@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.
Looks good, thanks!
Short description
In my prod env, I need to Tee queries from specific ip address, since there are multiple ip addresses on a single interface and the receiver has source address based ACLs and Views.
So I proposed an optional parameter in TeeAction to set the socket bind address.
Usage:
addAction(AllRule(), TeeAction("192.0.2.54", false, "192.0.2.53"))
Checklist
I have: