Skip to content
Snippets Groups Projects
Commit ddaa1c27 authored by Christoph Petrausch's avatar Christoph Petrausch
Browse files

Added support for RFC 8203 in notification decoder

parent 1337ccc9
No related branches found
No related tags found
No related merge requests found
...@@ -50,6 +50,10 @@ const ( ...@@ -50,6 +50,10 @@ const (
InvalidNetworkField = 10 InvalidNetworkField = 10
MalformedASPath = 11 MalformedASPath = 11
// Notification Msg Subcodes
AdministrativeShutdown = 2
AdministrativeReset = 4
// Attribute Type Codes // Attribute Type Codes
OriginAttr = 1 OriginAttr = 1
ASPathAttr = 2 ASPathAttr = 2
......
...@@ -114,7 +114,7 @@ func decodeNotificationMsg(buf *bytes.Buffer) (*BGPNotification, error) { ...@@ -114,7 +114,7 @@ func decodeNotificationMsg(buf *bytes.Buffer) (*BGPNotification, error) {
return invalidErrCode(msg) return invalidErrCode(msg)
} }
case Cease: case Cease:
if msg.ErrorSubcode != 0 { if !(msg.ErrorSubcode == 0 || msg.ErrorSubcode == AdministrativeShutdown || msg.ErrorSubcode == AdministrativeReset) {
return invalidErrCode(msg) return invalidErrCode(msg)
} }
default: default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment