summaryrefslogtreecommitdiffhomepage
path: root/server/fsm.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-07-01 16:55:42 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-07-01 18:06:56 +0900
commit4a022a42c62fa3c76424db1323bfdaca4571fdee (patch)
treec557e5cafaec738bfa2697f795cce3fb7b189ffb /server/fsm.go
parent1adfa485d578af59b653c9b2d141b12a97e89fb7 (diff)
server: don't set ttl to 1 when peer type is iBGP
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/fsm.go')
-rw-r--r--server/fsm.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/fsm.go b/server/fsm.go
index 7bced26c..749c925b 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -221,6 +221,11 @@ func (fsm *FSM) connectLoop() error {
conn, err := net.DialTimeout("tcp", host, time.Duration(MIN_CONNECT_RETRY-1)*time.Second)
if err == nil {
+ isEBGP := fsm.globalConfig.As != fsm.peerConfig.PeerAs
+ if isEBGP {
+ ttl := 1
+ SetTcpTTLSockopts(conn.(*net.TCPConn), ttl)
+ }
fsm.connCh <- conn
} else {
log.WithFields(log.Fields{