summaryrefslogtreecommitdiffhomepage
path: root/packet/bmp.go
diff options
context:
space:
mode:
Diffstat (limited to 'packet/bmp.go')
-rw-r--r--packet/bmp.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/packet/bmp.go b/packet/bmp.go
index 587a9fd7..eceb1272 100644
--- a/packet/bmp.go
+++ b/packet/bmp.go
@@ -136,7 +136,8 @@ func (h *BMPPeerHeader) Serialize() ([]byte, error) {
}
type BMPRouteMonitoring struct {
- BGPUpdate *BGPMessage
+ BGPUpdate *BGPMessage
+ BGPUpdatePayload []byte
}
func NewBMPRouteMonitoring(p BMPPeerHeader, update *BGPMessage) *BMPMessage {
@@ -162,6 +163,9 @@ func (body *BMPRouteMonitoring) ParseBody(msg *BMPMessage, data []byte) error {
}
func (body *BMPRouteMonitoring) Serialize() ([]byte, error) {
+ if body.BGPUpdatePayload != nil {
+ return body.BGPUpdatePayload, nil
+ }
return body.BGPUpdate.Serialize()
}