1
0
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:
Ben Cartwright-Cox
2023-02-27 15:17:53 +00:00
parent cc9cdbf5af
commit b2a79528c5

View File

@ -1033,7 +1033,7 @@ func (vap *VAP) GetFlag() uint8 {
func (c *Client) SendSDs(sessionId uint16, serialNumber uint32, data []SendableData) {
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
}
if data[i].Type() == "VRP" && data[j].Type() == "VRP" {