diff options
author | Michael Lechner <lechner@netography.com> | 2020-01-10 16:33:59 -0500 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2020-01-13 19:49:52 +0900 |
commit | c899a95b274906d83c0c272e723d557259c86f20 (patch) | |
tree | 9a22d21aa8dd1c03072e36a8053a4b0cc6ce1ce7 /pkg/packet/bmp/bmp_test.go | |
parent | 05a7e0e993de741a6a674305ed93562e93532ec4 (diff) |
Parse BMP Stats Report messages with unknown Stat Types
Diffstat (limited to 'pkg/packet/bmp/bmp_test.go')
-rw-r--r-- | pkg/packet/bmp/bmp_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/packet/bmp/bmp_test.go b/pkg/packet/bmp/bmp_test.go index be99b687..66150418 100644 --- a/pkg/packet/bmp/bmp_test.go +++ b/pkg/packet/bmp/bmp_test.go @@ -103,3 +103,9 @@ func Test_BogusHeader(t *testing.T) { assert.Nil(t, h) assert.NotNil(t, err) } + +func Test_RouteMonitoringUnknownType(t *testing.T) { + data := []byte{0x03, 0x00, 0x00, 0x00, 0xe4, 0x01, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x04, 0x70, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x1b, 0x1b, 0xd8, 0xda, 0xfc, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2b, 0xb5, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2b, 0xb5, 0x7f, 0xff, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe8, 0x80, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xeb, 0x80, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xeb, 0x80, 0x03, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x80, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x54, 0x80, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x80, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xa0} + _, err := ParseBMPMessage(data) + require.NoError(t, err) +} |