During restarting or stoping goBGP instance, it sends peer-down messages with reason code = 0. When I look at its code, code = 0 is its restarting value for peer down. Obviously goBGP should set a proper value during those phases. Other BGP programs may have this behaviour, bug or what ever you called because its hard match every event to a proper reason code.
It seems to me that for peer down messages should be processed and may assign a reason value of invalid reason code or e.t.c if its not already one.
peer-down.go
....
if pdw.Reason < 1 || pdw.Reason > 5 {
return nil, fmt.Errorf("invalid reason code %d in Peer Down message", pdw.Reason)
}
....
if it is ok, I will try to add this option to the code?
During restarting or stoping goBGP instance, it sends peer-down messages with reason code = 0. When I look at its code, code = 0 is its restarting value for peer down. Obviously goBGP should set a proper value during those phases. Other BGP programs may have this behaviour, bug or what ever you called because its hard match every event to a proper reason code. It seems to me that for peer down messages should be processed and may assign a reason value of invalid reason code or e.t.c if its not already one.
peer-down.go .... if pdw.Reason < 1 || pdw.Reason > 5 { return nil, fmt.Errorf("invalid reason code %d in Peer Down message", pdw.Reason) } ....
if it is ok, I will try to add this option to the code?