summaryrefslogtreecommitdiffhomepage
path: root/server/fsm.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-09-02 22:23:55 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-09-02 22:25:51 +0900
commitd83a16ed00cd1e3617fe06d9a1b1a1002406ccef (patch)
treea34732edaf68f5ad3bca4d530a767a5c73a59dd9 /server/fsm.go
parentac34370d4a7850265e719abb9ac5155b2f1dd523 (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.go4
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.