diff options
Diffstat (limited to 'packet/bgp/bgp.go')
-rw-r--r-- | packet/bgp/bgp.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packet/bgp/bgp.go b/packet/bgp/bgp.go index bca284d2..b0147a10 100644 --- a/packet/bgp/bgp.go +++ b/packet/bgp/bgp.go @@ -2951,6 +2951,16 @@ func (p *FlowSpecUnknown) String() string { return fmt.Sprintf("[unknown:%v]", p.Value) } +func (p *FlowSpecUnknown) MarshalJSON() ([]byte, error) { + return json.Marshal(struct { + Type BGPFlowSpecType `json:"type"` + Value string `json:"value"` + }{ + Type: p.Type(), + Value: string(p.Value), + }) +} + type FlowSpecNLRI struct { Value []FlowSpecComponentInterface rf RouteFamily |