summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp/bgp.go
diff options
context:
space:
mode:
authorWataru Ishida <ishida.wataru@lab.ntt.co.jp>2016-10-09 07:15:08 -0700
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-10-09 07:15:08 -0700
commit6b6f6974fcea37dc006f90dbd2f8d65495048725 (patch)
tree5dc899df38c1ab7e410ce13440a43a35b98a0810 /packet/bgp/bgp.go
parentc3d8784efc24816e30c3ba68cad8f9a8d9d00b28 (diff)
*: Notification support for BGP GR
implement draft-ietf-idr-bgp-gr-notification-07 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'packet/bgp/bgp.go')
-rw-r--r--packet/bgp/bgp.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/packet/bgp/bgp.go b/packet/bgp/bgp.go
index 916a5f69..b14eb8a5 100644
--- a/packet/bgp/bgp.go
+++ b/packet/bgp/bgp.go
@@ -426,11 +426,14 @@ func (c *CapGracefulRestart) MarshalJSON() ([]byte, error) {
})
}
-func NewCapGracefulRestart(restarting bool, time uint16, tuples []*CapGracefulRestartTuple) *CapGracefulRestart {
+func NewCapGracefulRestart(restarting, notification bool, time uint16, tuples []*CapGracefulRestartTuple) *CapGracefulRestart {
flags := 0
if restarting {
flags = 0x08
}
+ if notification {
+ flags |= 0x04
+ }
return &CapGracefulRestart{
DefaultParameterCapability: DefaultParameterCapability{
CapCode: BGP_CAP_GRACEFUL_RESTART,
@@ -3914,6 +3917,7 @@ const (
BGP_ERROR_SUB_OTHER_CONFIGURATION_CHANGE
BGP_ERROR_SUB_CONNECTION_COLLISION_RESOLUTION
BGP_ERROR_SUB_OUT_OF_RESOURCES
+ BGP_ERROR_SUB_HARD_RESET //draft-ietf-idr-bgp-gr-notification-07
)
// NOTIFICATION Error Subcode for BGP_ERROR_ROUTE_REFRESH