-
Notifications
You must be signed in to change notification settings - Fork 5.2k
AddressObject to inherit from Address::InstanceAccessor #39680
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
AddressObject to inherit from Address::InstanceAccessor #39680
Conversation
Updated the AddressObject class to inherit from Address::InstanceAccessor instead of StreamInfo::FilterState::Object. This change enhances the address handling capabilities while maintaining the existing functionality. This will allow to do CIDR range matching on AddressObject Signed-off-by: Florent Lecoultre <florent.lecoultre@datadoghq.com>
adisuissa
left a comment
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.
/assign-from @envoyproxy/senior-maintainers
| public: | ||
| AddressObject(Network::Address::InstanceConstSharedPtr address) : address_(address) {} | ||
| AddressObject(Network::Address::InstanceConstSharedPtr address) | ||
| : Address::InstanceAccessor(address), address_(address) {} |
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.
It seems that the address is now kept in 2 places: the address_ data member in AddressObject and the ip_ data member in InstanceAccessor.
I suggest ensuring ODR by only keeping the data member in InstanceAccessor.
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.
The address_ is now only store in InstanceAccessor but I add to create an additional method for InstanceAccessor to be able to share the InstanceConstSharedPtr
|
@envoyproxy/senior-maintainers assignee is @yanavlasov |
|
/wait |
Signed-off-by: Florent Lecoultre <florent.lecoultre@datadoghq.com>
yanavlasov
left a comment
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.
/wait
Signed-off-by: Florent Lecoultre <florent.lecoultre@datadoghq.com>
Updated the AddressObject class to inherit from
Address::InstanceAccessorinstead ofStreamInfo::FilterState::Object. This change enhances the address handling capabilities while maintaining the existing functionality. This will allow to do CIDR range matching on AddressObjectCommit Message: AddressObject to inherit from Address::InstanceAccessor
Additional Description: Updated the AddressObject class to inherit from Address::InstanceAccessor instead of StreamInfo::FilterState::Object. This change enhances the address handling capabilities while maintaining the existing functionality. This will allow to do CIDR range matching on AddressObject
Risk Level: Low
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]