diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-04-04 15:42:35 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-04-17 21:57:11 +0900 |
commit | 93c955a415f39f7f8d2a97a8298a8985d5dadc2f (patch) | |
tree | 84d1fa1ede4242ad73e72703d4462f703df5a92a /packet/bmp/bmp_test.go | |
parent | 5323187cf10bb0e2cc361aca0cfd9e84396828b9 (diff) |
packet/bmp: Obsolete policy argument for BMPPeerHeader
According to "draft-evens-grow-bmp-local-rib", the L flag in the Peer
Flags is NOT used for the locally sourced routes and the F flag is
defined into the same bit.
This patch removes "policy" argument and add "flags" argument for
BMPPeerHeader and NewBMPPeerHeader in order to distinguish which flag
is set (the L flag or the F flag).
Then introduce IsPostPolicy() func to show if the L flag is set or not.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'packet/bmp/bmp_test.go')
-rw-r--r-- | packet/bmp/bmp_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packet/bmp/bmp_test.go b/packet/bmp/bmp_test.go index dd7391aa..3d7737e0 100644 --- a/packet/bmp/bmp_test.go +++ b/packet/bmp/bmp_test.go @@ -48,14 +48,14 @@ func Test_Initiation(t *testing.T) { func Test_PeerUpNotification(t *testing.T) { m := bgp.NewTestBGPOpenMessage() - p0 := NewBMPPeerHeader(0, false, 1000, "10.0.0.1", 70000, "10.0.0.2", 1) + p0 := NewBMPPeerHeader(0, 0, 1000, "10.0.0.1", 70000, "10.0.0.2", 1) verify(t, NewBMPPeerUpNotification(*p0, "10.0.0.3", 10, 100, m, m)) - p1 := NewBMPPeerHeader(0, false, 1000, "fe80::6e40:8ff:feab:2c2a", 70000, "10.0.0.2", 1) + p1 := NewBMPPeerHeader(0, 0, 1000, "fe80::6e40:8ff:feab:2c2a", 70000, "10.0.0.2", 1) verify(t, NewBMPPeerUpNotification(*p1, "fe80::6e40:8ff:feab:2c2a", 10, 100, m, m)) } func Test_PeerDownNotification(t *testing.T) { - p0 := NewBMPPeerHeader(0, false, 1000, "10.0.0.1", 70000, "10.0.0.2", 1) + p0 := NewBMPPeerHeader(0, 0, 1000, "10.0.0.1", 70000, "10.0.0.2", 1) verify(t, NewBMPPeerDownNotification(*p0, BMP_PEER_DOWN_REASON_UNKNOWN, nil, []byte{0x3, 0xb})) m := bgp.NewBGPNotificationMessage(1, 2, nil) verify(t, NewBMPPeerDownNotification(*p0, BMP_PEER_DOWN_REASON_LOCAL_BGP_NOTIFICATION, m, nil)) @@ -63,7 +63,7 @@ func Test_PeerDownNotification(t *testing.T) { func Test_RouteMonitoring(t *testing.T) { m := bgp.NewTestBGPUpdateMessage() - p0 := NewBMPPeerHeader(0, false, 1000, "fe80::6e40:8ff:feab:2c2a", 70000, "10.0.0.2", 1) + p0 := NewBMPPeerHeader(0, 0, 1000, "fe80::6e40:8ff:feab:2c2a", 70000, "10.0.0.2", 1) verify(t, NewBMPRouteMonitoring(*p0, m)) } |