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

feature: Add gateway parameter in peers #205

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ElektronikerDev
Copy link

As described in #197 , it should be possible to set the gateway mode in peers, in which the gateway is determined.

The strings 'direct' or 'recursive' can be assigned to the gateway parameter.

Details to the "gateway" functionality are also described in the bird documentation: https://bird.network.cz/?get_doc&v=16&f=bird-6.html

Copy link
Owner

@natesales natesales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a check to validate that the string value is either "direct" or "recursive"?

@@ -629,6 +629,12 @@ func Load(configBlob []byte) (*config.Config, error) {
}
}

if peerData.Gateway != nil {
peerData.Gateway = util.Ptr(strings.ReplaceAll(*peerData.Gateway, "-", "_"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we refactor to assign directly rather than with a util.Ptr call? That's really just a helper function for constants.

*peerData.Gateway = strings.ReplaceAll(*peerData.Gateway, "-", "_")

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.

2 participants