diff --git a/cmd/stayrtr/stayrtr.go b/cmd/stayrtr/stayrtr.go index 2a77448..9645867 100644 --- a/cmd/stayrtr/stayrtr.go +++ b/cmd/stayrtr/stayrtr.go @@ -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, diff --git a/lib/server.go b/lib/server.go index 8be354f..32812f4 100644 --- a/lib/server.go +++ b/lib/server.go @@ -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 {