-
Notifications
You must be signed in to change notification settings - Fork 28
ospf: Add RFC 5613 support #77
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
Conversation
Even if there are some todos left, I already mark this PR as ready for a first review The answer to my question is in RFC 7166 Section 2. The LLS data block is appended before the authentication trailer. |
de21dc2
to
4bf4eca
Compare
8e2363e
to
4038927
Compare
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.
Wow, amazing work!
I used to think LLS was mostly used for proprietary extensions, but I see the IANA registry for LLS TLV types is quite big and references a number of RFCs. Is this prep work for something else you're planning to implement, or just general groundwork?
Overall this looks really good. I tested LLS combined with cryptographic authentication, for both OSPFv2 and v3, and I was pleased to see it's working (this is tricky business!). I've left a few review comments, mostly minor nits that should be easy to address.
Lastly, please do not forget to update the list of supported RFCs in the README :)
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.
I used to think LLS was mostly used for proprietary extensions, but I see the IANA registry for LLS TLV types is quite big and references a number of RFCs. Is this prep work for something else you're planning to implement, or just general groundwork?
You guessed it right :) My first plan was adding RFC 9339 but it depends on LLS data blocks. So, I started by adding them :)
Lastly, please do not forget to update the list of supported RFCs in the README :)
Sure, I will do that.
I will rewrite the git history to divide this series in 4 self-contained patches:
- Some preparation work by modifying current interfaces, i.e., using references in
V::decode_auth_validate
, extendingPacketVersion
with anoptions
function, and moving the auth digest check in a dedicated function. - The actual addition of RFC 5613 along with the repaired existing tests.
- Encode / decode tests for OSPFv2.
- Encode / decode tests for OSPFv3.
- Update V::decode_auth_validate() signature to use references rather than taking ownership of PacketHdrAuth and AuthDecodeCtx. These structures are required for OSPFv2 LLS data blocks authentication - Extend PacketVersion interface with function to retrieve Options field from Hello and DbDesc packets. - Move digest validation logic in a separate function as it will be required for LLS CA-TLV authentication. Signed-off-by: Nicolas Rybowski <[email protected]>
This commit introduces LLS data block appended to OSPF Hello and DbDesc packets. The current code is shared between OSPFv2 and OSPFv3. - About authentication: For OSPFv{2,3}, if the authentication is disabled, the LLS data block checksum is verified. For OSPFv2, when the authentication is enabled, the CA-TLV digest is verified. For OSPFv3, when the authentication is enabled, there is nothing to do as the LLS data block is included in the authentication digest. This behavior is documented in RFC 7166 Section 2. - About enabling LLS data blocks through YANG: LLS data blocks are enabled per interface. That enables generating LLS data block for Hello and DbDesc messages orginated for a that specific interface. If some LLS data is specified through OSPF configuration, the L-bit is enabled in the packet options. This feature also enables examining LLS data block for received messages if the option is enabled and the L-bit flag is present in the message options. Currently, the operation detailed above are mainly placeholders for future behavior since RFC 5613 does not mention how to configure the TLVs it specifies. - About the presence of EO TLV in LlsDbDescData: RFC 4811 Section 2.1 specifies that EO TLV may be included in DbDesc packets. Signed-off-by: Nicolas Rybowski <[email protected]> --- v0 -> v1: Fixed nits mentioned in Renato's review at holo-routing#77
This commit introduces LLS data block appended to OSPF Hello and DbDesc packets. The current code is shared between OSPFv2 and OSPFv3. - About authentication: For OSPFv{2,3}, if the authentication is disabled, the LLS data block checksum is verified. For OSPFv2, when the authentication is enabled, the CA-TLV digest is verified. For OSPFv3, when the authentication is enabled, there is nothing to do as the LLS data block is included in the authentication digest. This behavior is documented in RFC 7166 Section 2. - About enabling LLS data blocks through YANG: LLS data blocks are enabled per interface. That enables generating LLS data block for Hello and DbDesc messages orginated for a that specific interface. If some LLS data is specified through OSPF configuration, the L-bit is enabled in the packet options. This feature also enables examining LLS data block for received messages if the option is enabled and the L-bit flag is present in the message options. Currently, the operation detailed above are mainly placeholders for future behavior since RFC 5613 does not mention how to configure the TLVs it specifies. - About the presence of EO TLV in LlsDbDescData: RFC 4811 Section 2.1 specifies that EO TLV may be included in DbDesc packets. Signed-off-by: Nicolas Rybowski <[email protected]> --- v0 -> v1: Fixed nits mentioned in Renato's review at holo-routing#77
This commit introduces LLS data block appended to OSPF Hello and DbDesc packets. The current code is shared between OSPFv2 and OSPFv3. - About authentication: For OSPFv{2,3}, if the authentication is disabled, the LLS data block checksum is verified. For OSPFv2, when the authentication is enabled, the CA-TLV digest is verified. For OSPFv3, when the authentication is enabled, there is nothing to do as the LLS data block is included in the authentication digest. This behavior is documented in RFC 7166 Section 2. - About enabling LLS data blocks through YANG: LLS data blocks are enabled per interface. That enables generating LLS data block for Hello and DbDesc messages orginated for a that specific interface. If some LLS data is specified through OSPF configuration, the L-bit is enabled in the packet options. This feature also enables examining LLS data block for received messages if the option is enabled and the L-bit flag is present in the message options. Currently, the operation detailed above are mainly placeholders for future behavior since RFC 5613 does not mention how to configure the TLVs it specifies. - About the presence of EO TLV in LlsDbDescData: RFC 4811 Section 2.1 specifies that EO TLV may be included in DbDesc packets. Signed-off-by: Nicolas Rybowski <[email protected]> --- v0 -> v1: Fixed nits mentioned in Renato's review at holo-routing#77
This commit introduces LLS data block appended to OSPF Hello and DbDesc packets. The current code is shared between OSPFv2 and OSPFv3. - About authentication: For OSPFv{2,3}, if the authentication is disabled, the LLS data block checksum is verified. For OSPFv2, when the authentication is enabled, the CA-TLV digest is verified. For OSPFv3, when the authentication is enabled, there is nothing to do as the LLS data block is included in the authentication digest. This behavior is documented in RFC 7166 Section 2. - About enabling LLS data blocks through YANG: LLS data blocks are enabled per interface. That enables generating LLS data block for Hello and DbDesc messages orginated for a that specific interface. If some LLS data is specified through OSPF configuration, the L-bit is enabled in the packet options. This feature also enables examining LLS data block for received messages if the option is enabled and the L-bit flag is present in the message options. Currently, the operation detailed above are mainly placeholders for future behavior since RFC 5613 does not mention how to configure the TLVs it specifies. - About the presence of EO TLV in LlsDbDescData: RFC 4811 Section 2.1 specifies that EO TLV may be included in DbDesc packets. Signed-off-by: Nicolas Rybowski <[email protected]> --- v0 -> v1: Fixed nits mentioned in Renato's review at holo-routing#77
Signed-off-by: Nicolas Rybowski <[email protected]>
Hello messages are tested with and without packet authentication. DbDesc messages are only tested without packet authentication. Signed-off-by: Nicolas Rybowski <[email protected]> --- v0 -> v1: Add DbDesc tests as RFC 4811 Section 2.1 mention that LLS EO-TLV may be included in DbDesc packets.
Hello messages are tested with and without packet authentication. DbDesc messages are only tested without packet authentication. Signed-off-by: Nicolas Rybowski <[email protected]> --- v0 -> v1: Add DbDesc tests as RFC 4811 Section 2.1 mention that LLS EO-TLV may be included in DbDesc packets.
There we go, the PR is ready for review :) |
This patch depends on RFC 5613, added with holo-routing#77. Signed-off-by: Nicolas Rybowski <[email protected]>
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.
Thanks for the updates. Fantastic work! Merging...
You guessed it right :) My first plan was adding RFC 9339 but it depends on LLS data blocks. So, I started by adding them :)
Woot, that's great to hear!
This patch adds Reverse Metric and Reverse TE Metric TLVs to LLS data blocks. This patch hence depends on RFC 5613, added with holo-routing#77. Signed-off-by: Nicolas Rybowski <[email protected]>
This PR introduces Link-Local Signaling data block appended to OSPF Hello and DbDesc packets. The current code is shared between OSPFv2 and OSPFv3.
See RFC 5613.
TODO
- [ ] get LLS data from interfaces configuration.=> not specified in RFC 5613.