Skip to content

Commit

Permalink
isis: include LSP authentication digests in state data
Browse files Browse the repository at this point in the history
Signed-off-by: Renato Westphal <[email protected]>
  • Loading branch information
rwestphal committed Jan 25, 2025
1 parent 0691f1a commit 0e17311
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion holo-isis/src/northbound/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,19 @@ fn load_callbacks() -> Callbacks<Instance> {
CryptoAlgo::HmacMd5.to_yang()
}
});
let authentication_key =
lsp.tlvs.auth.as_ref().and_then(|auth| match auth {
AuthenticationTlv::ClearText(..) => None,
AuthenticationTlv::HmacMd5(digest) => Some(Cow::Owned(
digest
.iter()
.map(|byte| format!("{:02x}", byte))
.collect(),
)),
});
Box::new(Authentication {
authentication_type,
authentication_key: None,
authentication_key,
})
})
.path(isis::database::levels::lsp::unknown_tlvs::unknown_tlv::PATH)
Expand Down

0 comments on commit 0e17311

Please sign in to comment.