Skip to content

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"?

}

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