summaryrefslogtreecommitdiffhomepage
path: root/packet
diff options
context:
space:
mode:
Diffstat (limited to 'packet')
-rw-r--r--packet/bgp.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/packet/bgp.go b/packet/bgp.go
index c001686f..407b4b9f 100644
--- a/packet/bgp.go
+++ b/packet/bgp.go
@@ -2625,6 +2625,8 @@ func parseBody(h *BGPHeader, data []byte) (*BGPMessage, error) {
msg.Body = &BGPKeepAlive{}
case BGP_MSG_ROUTE_REFRESH:
msg.Body = &BGPRouteRefresh{}
+ default:
+ return nil, NewMessageError(BGP_ERROR_MESSAGE_HEADER_ERROR, BGP_ERROR_SUB_BAD_MESSAGE_TYPE, nil, "unknown message type")
}
err := msg.Body.DecodeFromBytes(data)
if err != nil {