1
0
mirror of https://github.com/bgp/stayrtr.git synced 2024-05-06 15:54:54 +00:00

Always automatically generate a RTR Session ID

This commit is contained in:
Job Snijders
2023-02-06 11:10:07 +00:00
parent 1319beff75
commit bd5a54d54d
2 changed files with 1 additions and 8 deletions

View File

@ -51,7 +51,6 @@ var (
ExportPath = flag.String("export.path", "/rpki.json", "Export path")
RTRVersion = flag.Int("protocol", 1, "RTR protocol version")
SessionID = flag.Int("rtr.sessionid", -1, "Set session ID (if < 0: will be randomized)")
RefreshRTR = flag.Int("rtr.refresh", 3600, "Refresh interval")
RetryRTR = flag.Int("rtr.retry", 600, "Retry interval")
ExpireRTR = flag.Int("rtr.expire", 7200, "Expire interval")
@ -613,7 +612,6 @@ func run() error {
sc := rtr.ServerConfiguration{
ProtocolVersion: protoverToLib[*RTRVersion],
SessId: *SessionID,
KeepDifference: 3,
Log: log.StandardLogger(),
LogVerbose: *LogVerbose,

View File

@ -157,12 +157,7 @@ type ServerConfiguration struct {
}
func NewServer(configuration ServerConfiguration, handler RTRServerEventHandler, simpleHandler RTREventHandler) *Server {
var sessid uint16
if configuration.SessId < 0 {
sessid = GenerateSessionId()
} else {
sessid = uint16(configuration.SessId)
}
sessid := GenerateSessionId()
refreshInterval := uint32(3600)
if configuration.RefreshInterval != 0 {