-
Notifications
You must be signed in to change notification settings - Fork 8
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
Mention multiple capsules are allowed #33
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This initial paragraph is good! However, I think we could drop a bit more text in, either for each capsule, or in this summary. Just a very simple explanation of what multiple means (that they don't replace each other, but add):
If an endpoint receives multiple ADDRESS_ASSIGN capsules, all of the assigned addresses or prefixes can be used. For example, multiple ADDRESS_ASSIGN capsules are necessary to assign both IPv4 and IPv6 addresses.
If an endpoint receives multiple ROUTE_ADVERTISEMENT capsules, all of the advertised routes can be used. For example, multiple ROUTE_ADVERTISEMENT capsules are necessary to provide routing to both IPv4 and IPv6 hosts. Routes are removed using ROUTE_WITHDRAWAL capsules.
@@ -334,6 +343,12 @@ packets in that prefix to its peer. Note that this capsule can be reordered | |||
with DATAGRAM frames, and therefore an endpoint that receives packets for | |||
routes it has rejected MUST NOT treat that as an error. | |||
|
|||
ROUTE_ADVERTISEMENT and ROUTE_WITHDRAWAL capsules are applied in order of | |||
receipt: if a prefix is covered by multiple received ROUTE_ADVERTISEMENT and/or | |||
ROUTE_WITHDRAWAL capsules, only the last received capsule applies as it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This text is a bit confusing as written. Maybe rephrase this as "ROUTE_ADVERTISEMENT and ROUTE_WITHDRAWAL for a specific prefix [...]"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would mean something different. I phrased this specifically to cover the scenario of one route containing another.
For example if we have the following sequence:
- ROUTE_ADVERTISEMENT 2001:DB8::/32
- ROUTE_WITHDRAWAL 2001:DB8:1111:2222/64
Then the recipient has routes in the tunnel for 2001:DB8:0000:0000-2001:DB8:1111:2221 and 2001:DB8:1111:2223-2001:DB8:FFFF:FFFF.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point was that right now you have to read the sentence 1.5 times to understand it, because the qualifier for what "last received update applies" is at the very end. This is an editorial nit, but I think the current sentence structure is confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fair. Can you propose text that accounts for the scenario when one prefix is included in another?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In attempting to suggest text that I find more clear, I actually think I found a bug in these semantics.
We've overloaded WITHDRAWAL to mean two things in this setup:
- Undo a previous ADVERTISEMENT
- Create an entry in the routing table that means no-route
These are actually slightly different operations, even though it sounds like they should produce the same effect, because of the processing of overlap.
The in-order logic simply means whenever you get a new ADVERTISEMENT, you append it to your table -- pretty simple. But WITHDRAWAL has to first scan for an exact match in the table, and if it finds one, delete it. If it does not, then it needs to add an entry for no-route. But that implies the ADVERTISEMENT logic is similarly wrong: it has to also delete any no-route entries that may already exist.
Perhaps ADVERTISEMENT should grow another field in the capsule indicating if the range is routable or not, and WITHDRAW is simply an inverse of ADVERTISEMENT? That way a positive route and null route are represented without overload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #32