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

bird route parsing (startDefinition) #13

Open
empi89 opened this issue Dec 27, 2019 · 0 comments
Open

bird route parsing (startDefinition) #13

empi89 opened this issue Dec 27, 2019 · 0 comments

Comments

@empi89
Copy link

empi89 commented Dec 27, 2019

I have found this old issue pointing to an issue when having dashes inside the protocol name within the bird config: ecix/alice-lg#12
This means that e.g. coreX_city does not work as protocol name.

From my understanding this is due to

regex.routes.startDefinition = regexp.MustCompile(`^([0-9a-f\.\:\/]+)\s+via\s+([0-9a-f\.\:]+)\s+on\s+([\w\.]+)\s+\[([\w\.:]+)\s+([0-9\-\:\s]+)(?:\s+from\s+([0-9a-f\.\:\/]+)){0,1}\]\s+(?:(\*)\s+){0,1}\((\d+)(?:\/\d+){0,1}\).*`)
which parses [\w.:]+ for the protocol name. Would it be possible to change this to [0-9a-zA-Z_-.:]+?

Another issue I have found on our setup is the second value of the distance, e.g.:
aaaa:a401:8007::/48 via aaaa:bbbb:e001::1 on eth0 [corexcity 2019-12-27 14:03:10 from aaaa:bbbb:1337:5::7] * (100**/?**) [AS11111i]

This is not parsed because of the ?. This could be fixed by changing (?:/\d+) to (?:/[?\d]+)

Would it be possible to fix those or document the conditions that need to be fulfilled by the environment?

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

No branches or pull requests

1 participant