mirror of
https://github.com/bgp/stayrtr.git
synced 2024-05-06 15:54:54 +00:00
Merge pull request #87 from bgp/remove_sessionid_modifier
Always automatically generate a RTR Session ID
This commit is contained in:
@ -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,
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user