diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-09-02 22:23:55 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-09-02 22:25:51 +0900 |
commit | d83a16ed00cd1e3617fe06d9a1b1a1002406ccef (patch) | |
tree | a34732edaf68f5ad3bca4d530a767a5c73a59dd9 /server/fsm.go | |
parent | ac34370d4a7850265e719abb9ac5155b2f1dd523 (diff) |
improve multihop ttl support
if you don't specify ttl, then we use the OS-default ttl.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/fsm.go')
-rw-r--r-- | server/fsm.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/fsm.go b/server/fsm.go index 6c048acd..4c13edae 100644 --- a/server/fsm.go +++ b/server/fsm.go @@ -341,7 +341,9 @@ func (h *FSMHandler) active() bgp.FSMState { if fsm.pConf.EbgpMultihop.EbgpMultihopConfig.Enabled == true { ttl = int(fsm.pConf.EbgpMultihop.EbgpMultihopConfig.MultihopTtl) } - SetTcpTTLSockopts(conn.(*net.TCPConn), ttl) + if ttl != 0 { + SetTcpTTLSockopts(conn.(*net.TCPConn), ttl) + } } // we don't implement delayed open timer so move to opensent right // away. |