-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
isis, lib: add isis srv6 end sid to ls_prefix #15797
Conversation
Found it, I only had to parse the locator TLV from the LSP.
|
90f5312
to
56600ce
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.
Overall looks good. I have a few comments.
lib/link_state.c
Outdated
json_object_object_add(json, "segment-routing-ipv6", jsrv6); | ||
snprintfrr(buf, INET6_BUFSIZ, "%pI6", &pref->srv6.sid); | ||
json_object_string_add(jsrv6, "sid", buf); | ||
json_object_string_add(jsrv6, "sid", |
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.
The name of this json field is incorrect. It should be "endpoint-behavior" or "behavior".
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.
replaced with behavior
isisd/isis_te.c
Outdated
memcpy(&sr.sid, &psid->sid, sizeof(struct in6_addr)); | ||
|
||
if (!CHECK_FLAG(ls_pref->flags, LS_PREF_SRV6) || | ||
!memcmp(&ls_pref->srv6, &sr, sizeof(struct ls_srv6_sid))) { |
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.
Here, shouldn't be the opposite?
!memcmp(&ls_pref->srv6, &sr, sizeof(struct ls_srv6_sid))) { | |
memcmp(&ls_pref->srv6, &sr, sizeof(struct ls_srv6_sid))) { |
We are comparing the new SID sr
that we received from the LSP with the SID we already had ls_pref->srv6
.
If memcmp(...) != 0
, it means the SID has changed, and therefore we need to update ls_pref->srv6
.
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.
right. modified
56600ce
to
6a6abad
Compare
ci:rerun |
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.
LGTM
6a6abad
to
ac10c04
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.
looks good
According to draft-ietf-lsr-isis-srv6-extensions draft, the End SID should be available in link state prefix information. Add the SID information in the link state prefix, by getting the END SID from the locator TLV information. Signed-off-by: Philippe Guibert <[email protected]>
ac10c04
to
4e76df0
Compare
According to draft-ietf-lsr-isis-srv6-extensions draft, the End SID should be available in link state prefix information. Add the SID information in the link state prefix.
I have however a problem. how to test it .. I tried , but without success:
Observed
Expected: