-
Notifications
You must be signed in to change notification settings - Fork 764
fix: prevent AS loop #2882
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
fix: prevent AS loop #2882
Conversation
efe7618 to
5221990
Compare
|
I agree that this is the expected behavior. Hmm, I can't recall why I merged #2488 |
|
I thought that It would be better to allow whatever a user wants to do (even it's a mistake from the BGP perspective). No? |
|
Well, I don't think this is a good idea to break from BGP behavior to allow mistakes made by the user. |
|
@floatingstatic Opinions? |
|
@fujita This will break an application I built around gobgp where I need to advertise some routes with an origin ASN that matches the ASN of an iBGP peer in some but not all cases. Can I suggest we make a configuration option to enable the behavior I need instead of reverting? We can make this disabled by default which should suffice for @maxime-peim 's needs. I'm happy to do the work for this and can open a PR later today to implement this if that works for you. |
|
Hi @floatingstatic, |
|
@maxime-peim Sorry for confusion due to my wording. For my use case the paths that are filtered without this check are routes i originate so I used the term "origin asn" but the as-path loop logic doesn't actually care where the asn is in the path generally. To your question about why I can't use an export policy is because the as-path loop check happens before any policy is applied (see I have a branch I'm testing right now that just adds a per-neighbor/peer option to allow me to get the behavior I need for my traffic engineering application to function and by default it would revert to behavior prior to #2448 so that should make all of us happy :) |
|
The check |
|
@maxime-peim yep got it. i understand how the as-path check works. regarding the export policy thing, without explaining in great detail how my application works, no this is not possible as we are mirroring routes that already have as-path set. |
|
@floatingstatic perfect thanks! |
|
@fujita I'd like to propose we go with this instead of this revert PR: Open to comments about the config option name or what struct you feel this should go under. I tested pulling my fork into my route injector application and setting this configuration option allows me to get what I want and not setting it (default) reverts to behavior @maxime-peim is expecting. |
Revert #2488
We should not allow a path with an AS loop to be advertised.
iBGP peers should not add locally originated routes with there own AS in their path.