Skip to content
Snippets Groups Projects
Unverified Commit 46a2f9bb authored by Daniel Czerwonk's avatar Daniel Czerwonk Committed by GitHub
Browse files

Merge pull request #31 from hikhvar/feature/more-cease-codes

Feature: Added support for RFC 8203 in notification decoder
parents bc3f1809 ddaa1c27
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,10 @@ const (
InvalidNetworkField = 10
MalformedASPath = 11
// Notification Msg Subcodes
AdministrativeShutdown = 2
AdministrativeReset = 4
// Attribute Type Codes
OriginAttr = 1
ASPathAttr = 2
......
......@@ -114,7 +114,7 @@ func decodeNotificationMsg(buf *bytes.Buffer) (*BGPNotification, error) {
return invalidErrCode(msg)
}
case Cease:
if msg.ErrorSubcode != 0 {
if !(msg.ErrorSubcode == 0 || msg.ErrorSubcode == AdministrativeShutdown || msg.ErrorSubcode == AdministrativeReset) {
return invalidErrCode(msg)
}
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment