diff options
Diffstat (limited to 'pkg/packet')
-rw-r--r-- | pkg/packet/bgp/bgp.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkg/packet/bgp/bgp.go b/pkg/packet/bgp/bgp.go index 2790c080..0bb399b7 100644 --- a/pkg/packet/bgp/bgp.go +++ b/pkg/packet/bgp/bgp.go @@ -7800,7 +7800,15 @@ func (l *LsAddrPrefix) Serialize(options ...*MarshallingOption) ([]byte, error) } func (l *LsAddrPrefix) MarshalJSON() ([]byte, error) { - return nil, nil + return json.Marshal(struct { + Type LsNLRIType `json:"type"` + Length uint16 `json:"length"` + NLRI string `json:"nlri"` + }{ + l.Type, + l.Length, + l.String(), + }) } func (l *LsAddrPrefix) String() string { |