Skip to content

Commit

Permalink
fix isis sid tag
Browse files Browse the repository at this point in the history
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
  • Loading branch information
sbezverk committed Aug 24, 2021
1 parent 27cacc6 commit 48eb70e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/sr/sr-adjacencysid.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (a *AdjacencySIDTLV) MarshalJSON() ([]byte, error) {
return json.Marshal(struct {
Flags *AdjOSPFFlags `json:"flags,omitempty"`
Weight uint8 `json:"weight"`
SID uint32 `json:"prefix_sid,omitempty"`
SID uint32 `json:"sid,omitempty"`
}{
Flags: f,
Weight: a.Weight,
Expand All @@ -52,7 +52,7 @@ func (a *AdjacencySIDTLV) MarshalJSON() ([]byte, error) {
return json.Marshal(struct {
Flags *UnknownProtoFlags `json:"flags,omitempty"`
Weight uint8 `json:"weight"`
SID uint32 `json:"prefix_sid,omitempty"`
SID uint32 `json:"sid,omitempty"`
}{
Flags: f,
Weight: a.Weight,
Expand Down Expand Up @@ -101,8 +101,8 @@ func (a *AdjacencySIDTLV) UnmarshalJSON(b []byte) error {
return err
}
}
// SID uint32 `json:"prefix_sid,omitempty"`
if v, ok := objVal["prefix_sid"]; ok {
// SID uint32 `json:"sid,omitempty"`
if v, ok := objVal["sid"]; ok {
if err := json.Unmarshal(v, &result.SID); err != nil {
return err
}
Expand Down

0 comments on commit 48eb70e

Please sign in to comment.