-
Notifications
You must be signed in to change notification settings - Fork 642
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
BGP AS Path not supporting AS Path Stuffing #932
Comments
Thanks for bringing this up. It's not clear to me why we have a nested list of as-path numbers. I expect we would have just one flat, ordered list with an index as the key and one aspath per index. But for some reason the OC model has a nested model where there is a list of leaf-lists. @aashaikh do you have any history on why we have a nested as-path model? |
Hello, the as-path structure is mapped 1:1 to RFC 4271, that's fine and it probably shouldn't get flattened. The problem is just the usage/definition of Also note that by having an index-value structure, you're effectively making the AS path ridiculously unreadable for anybody (and also unreasonably large). I would suggest to actually update the YANG RFC to add data types of "implicitly indexed ordered list of the same type" or something like that, and then use such a type. This kind of data structure is well representable in XML, JSON and CBOR and it's a pity that every list has to have explicit indexes just for nothing. |
This is not really the forum to suggest changes to the yang language. If there is some format you suggest that would be more readable and legal in yang 1.0, we could entertain that. |
I think that you are posing a false dilemma. Adhering to bad tools is not a good thing just because everybody uses them.
And regarding the fact that this issue was laying dormant for 9 months, there's definitly no rush and we can just wait for an improved YANG version.
I'm ok with drafting that YANG update myself, btw, not calling for you to do it.
…On 19 March 2024 17:26:16 CET, Darren Loher ***@***.***> wrote:
This is not really the forum to suggest changes to the yang language. If there is some format you suggest that would be more readable and legal in yang 1.0, we could entertain that.
--
Reply to this email directly or view it on GitHub:
#932 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
I am interested to see your proposal! Please do share what you are thinking in yang or even as a hypothetical tree structure to get the conversation started before writing/refactoring yang. (for example, the current portion of the tree we are discussing:)
|
@marenamat re: updating the RFC, this has been solved in yang 1.1 [for non-configuration data], rfc7950. |
In
openconfig-rib-bgp-attributes.yang
,grouping bgp-as-path-attr-state
declaresmember
asleaf-list
which has unique elements by RFC. This way, AS Stuffed Path (like65533 65533 65533 65500
) generates YANG-invalid data. Dunno how to fix this, maybe even by updating the RFC to allow non-unique elements inleaf-list
?The text was updated successfully, but these errors were encountered: