mirror of
https://github.com/bgp/stayrtr.git
synced 2024-05-06 15:54:54 +00:00
Fix possible crash from ROA PDU Race Minimization logic
Should fix the issue at the bottom Tag https://github.com/bgp/stayrtr/issues/92
This commit is contained in:
@ -1033,7 +1033,7 @@ func (vap *VAP) GetFlag() uint8 {
|
|||||||
|
|
||||||
func (c *Client) SendSDs(sessionId uint16, serialNumber uint32, data []SendableData) {
|
func (c *Client) SendSDs(sessionId uint16, serialNumber uint32, data []SendableData) {
|
||||||
sort.Slice(data, func(i, j int) bool {
|
sort.Slice(data, func(i, j int) bool {
|
||||||
if data[i].Type() == "VRP" && data[i].Type() != "VRP" {
|
if data[i].Type() == "VRP" && data[j].Type() != "VRP" {
|
||||||
return false // Always send VRPs first
|
return false // Always send VRPs first
|
||||||
}
|
}
|
||||||
if data[i].Type() == "VRP" && data[j].Type() == "VRP" {
|
if data[i].Type() == "VRP" && data[j].Type() == "VRP" {
|
||||||
|
Reference in New Issue
Block a user