summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2017-06-16 09:19:58 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-06-23 18:13:19 +0900
commitbc3e06a55fbebd391525d8ce13f84e59cfe8060e (patch)
tree6c0caddfed9e31d45958393612793b6aac744b2d
parent4af2f4b7d59ad0173ac7e11ca781981fd3f97546 (diff)
config: TTL value for BGP packets
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
-rw-r--r--config/bgp_configs.go5
-rw-r--r--tools/pyang_plugins/gobgp.yang5
2 files changed, 10 insertions, 0 deletions
diff --git a/config/bgp_configs.go b/config/bgp_configs.go
index a76708b6..f170e97c 100644
--- a/config/bgp_configs.go
+++ b/config/bgp_configs.go
@@ -2073,6 +2073,8 @@ type TransportConfig struct {
// original -> gobgp:remote-port
//gobgp:remote-port's original type is inet:port-number
RemotePort uint16 `mapstructure:"remote-port" json:"remote-port,omitempty"`
+ // original -> gobgp:ttl
+ Ttl uint8 `mapstructure:"ttl" json:"ttl,omitempty"`
}
func (lhs *TransportConfig) Equal(rhs *TransportConfig) bool {
@@ -2094,6 +2096,9 @@ func (lhs *TransportConfig) Equal(rhs *TransportConfig) bool {
if lhs.RemotePort != rhs.RemotePort {
return false
}
+ if lhs.Ttl != rhs.Ttl {
+ return false
+ }
return true
}
diff --git a/tools/pyang_plugins/gobgp.yang b/tools/pyang_plugins/gobgp.yang
index 434d4164..9ada88d4 100644
--- a/tools/pyang_plugins/gobgp.yang
+++ b/tools/pyang_plugins/gobgp.yang
@@ -807,6 +807,11 @@ module gobgp {
leaf remote-port {
type inet:port-number;
}
+
+ leaf ttl {
+ description "TTL value for BGP packets";
+ type uint8;
+ }
}
augment "/bgp:bgp/bgp:neighbors/bgp:neighbor/bgp:timers/bgp:config" {