From 03a1cee4d7d02b2aa3ebec8d67d155d33a7e664d Mon Sep 17 00:00:00 2001 From: Trekkie Coder Date: Tue, 5 Mar 2024 01:15:55 +0900 Subject: [PATCH] gh-565 Fixed issue with mydisc persistence --- proto/bfd.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/proto/bfd.go b/proto/bfd.go index cbca12e5..0b6d1736 100644 --- a/proto/bfd.go +++ b/proto/bfd.go @@ -50,7 +50,7 @@ const ( BFDMinSysTXIntervalUs = 100000 BFDDflSysTXIntervalUs = 200000 BFDMinSysRXIntervalUs = 200000 - BFDIncrDiscVal = 0x10000000 + BFDIncrDiscVal = 0x00000001 ) type ConfigArgs struct { @@ -80,7 +80,7 @@ type Notifer interface { type bfdSession struct { RemoteName string - SourceIP string + SourceIP string Instance string Cxn net.Conn State SessionState @@ -248,9 +248,9 @@ func (bs *Struct) processBFD(conn *net.UDPConn) { sess := bs.BFDSessMap[remIP.String()] if sess != nil { sess.RunSessionSM(raw) - } else { + } /* else { tk.LogIt(tk.LogDebug, "bfd session(%s) not found\n", remIP.String()) - } + } */ } } @@ -426,8 +426,8 @@ func (b *bfdSession) initialize(remoteIP string, sourceIP string, port uint16, i if myIP == nil { return errors.New("source address malformed") } - b.SourceIP = sourceIP - + b.SourceIP = sourceIP + if myIP.IsUnspecified() { myIP = getMyDisc(ip) if myIP == nil {