Skip to content

Commit

Permalink
Patch goBGP hardeker
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur de Kerhor committed Mar 28, 2022
1 parent 6248c57 commit 6aafc1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions internal/pkg/config/bgp_configs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/server/fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ func (h *fsmHandler) connectLoop(ctx context.Context, wg *sync.WaitGroup) {
defer wg.Done()
fsm := h.fsm

retry, addr, port, password, ttl, ttlMin, localAddress, bindInterface := func() (int, string, int, string, uint8, uint8, string, string) {
retry, addr, port, password, ttl, ttlMin, localAddress, localPort, bindInterface := func() (int, string, int, string, uint8, uint8, string, int, string) {
fsm.lock.RLock()
defer fsm.lock.RUnlock()

Expand All @@ -517,7 +517,7 @@ func (h *fsmHandler) connectLoop(ctx context.Context, wg *sync.WaitGroup) {
ttl = fsm.pConf.EbgpMultihop.Config.MultihopTtl
}
}
return tick, addr, port, password, ttl, ttlMin, fsm.pConf.Transport.Config.LocalAddress, fsm.pConf.Transport.Config.BindInterface
return tick, addr, port, password, ttl, ttlMin, fsm.pConf.Transport.Config.LocalAddress, int(fsm.pConf.Transport.Config.LocalPort), fsm.pConf.Transport.Config.BindInterface
}()

tick := minConnectRetryInterval
Expand All @@ -539,7 +539,7 @@ func (h *fsmHandler) connectLoop(ctx context.Context, wg *sync.WaitGroup) {
}).Debug("try to connect")
}

laddr, err := net.ResolveTCPAddr("tcp", net.JoinHostPort(localAddress, "0"))
laddr, err := net.ResolveTCPAddr("tcp", net.JoinHostPort(localAddress, strconv.Itoa(localPort)))
if err != nil {
log.WithFields(log.Fields{
"Topic": "Peer",
Expand Down

0 comments on commit 6aafc1d

Please sign in to comment.