diff --git a/lib/server.go b/lib/server.go index 37efa16..ad0a459 100644 --- a/lib/server.go +++ b/lib/server.go @@ -536,6 +536,7 @@ func (s *Server) Start(bind string) error { } var DisableBGPSec = flag.Bool("disable.bgpsec", false, "Disable sending out BGPSEC Router Keys") +var DisableASPA = flag.Bool("disable.aspa", false, "Disable sending out ASPA objects") func (s *Server) acceptClientTCP(tcpconn net.Conn) error { client := ClientFromConn(tcpconn, s, s) @@ -547,6 +548,9 @@ func (s *Server) acceptClientTCP(tcpconn net.Conn) error { if *DisableBGPSec { client.DisableBGPsec() } + if *DisableASPA { + client.DisableASPA() + } go client.Start() return nil } @@ -733,6 +737,7 @@ type Client struct { expireInterval uint32 dontSendBGPsecKeys bool + dontSendASPA bool log Logger } @@ -757,6 +762,10 @@ func (c *Client) DisableBGPsec() { c.dontSendBGPsecKeys = true } +func (c *Client) DisableASPA() { + c.dontSendASPA = true +} + func (c *Client) SetIntervals(refreshInterval uint32, retryInterval uint32, expireInterval uint32) { c.refreshInterval = refreshInterval c.retryInterval = retryInterval @@ -1150,7 +1159,7 @@ func (c *Client) SendData(sd SendableData) { } c.SendPDU(pdu) case *ASPARecord: - if c.version < 2 || c.dontSendBGPsecKeys { + if c.version < 2 || c.dontSendASPA { return }