Skip to content

Commit

Permalink
Fix node/adjacency/peer-set SID type
Browse files Browse the repository at this point in the history
Co-authored-by: watal <watal.i27e@gmail.com>
  • Loading branch information
Enigamict and watal committed May 21, 2023
1 parent cbd1492 commit ba162b3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/packet/bgp/bgp.go
Original file line number Diff line number Diff line change
Expand Up @@ -7943,7 +7943,7 @@ func NewLsTLVAdjacencySID(l *uint32) *LsTLVAdjacencySID {
var flags uint8
return &LsTLVAdjacencySID{
LsTLV: LsTLV{
Type: BGP_ASPATH_ATTR_TYPE_SET,
Type: LS_TLV_ADJACENCY_SID,
Length: 7, // TODO: Implementation to judge 7 octets or 8 octets
},
Flags: flags,
Expand Down Expand Up @@ -8075,7 +8075,7 @@ type LsTLVPeerNodeSID struct {
func NewLsTLVPeerNodeSID(l *LsBgpPeerSegmentSID) *LsTLVPeerNodeSID {
return &LsTLVPeerNodeSID{
LsTLV: LsTLV{
Type: BGP_ASPATH_ATTR_TYPE_SET,
Type: LS_TLV_PEER_NODE_SID,
Length: l.Flags.SidLen(),
},
Flags: l.Flags.FlagBits(),
Expand Down Expand Up @@ -8166,7 +8166,7 @@ type LsTLVPeerAdjacencySID struct {
func NewLsTLVPeerAdjacencySID(l *LsBgpPeerSegmentSID) *LsTLVPeerAdjacencySID {
return &LsTLVPeerAdjacencySID{
LsTLV: LsTLV{
Type: BGP_ASPATH_ATTR_TYPE_SET,
Type: LS_TLV_ADJACENCY_SID,
Length: l.Flags.SidLen(),
},
Flags: l.Flags.FlagBits(),
Expand Down Expand Up @@ -8257,7 +8257,7 @@ type LsTLVPeerSetSID struct {
func NewLsTLVPeerSetSID(l *LsBgpPeerSegmentSID) *LsTLVPeerSetSID {
return &LsTLVPeerSetSID{
LsTLV: LsTLV{
Type: BGP_ASPATH_ATTR_TYPE_SET,
Type: LS_TLV_PEER_SET_SID,
Length: l.Flags.SidLen(),
},
Flags: l.Flags.FlagBits(),
Expand Down

0 comments on commit ba162b3

Please sign in to comment.