osrg / gobgp

BGP implemented in the Go Programming Language
https://osrg.github.io/gobgp/
Apache License 2.0
3.62k stars 688 forks source link

Incorrect nexthop attribute sent in update when peer is disconnected #807

Closed DanCripe closed 8 years ago

DanCripe commented 8 years ago

When a link between two routers goes down, each router deletes the paths reported by their peer and sends out an update to other peers. However, when this update is sent out, it needs to be adjusted to have the local router's nexthop data (as set by UpdatePathAttrs()). The gobgp code is not applying this change, so the nexthop data is wrong and the peers receive an impossible nexthop value (no direct connection).

I believe each call to CreateUpdateMsgFromPaths() should have a corresponding loop calling UpdatePathAttrs() for each path to be sent.

ishidawataru commented 8 years ago

Hi, Also reproduced here. Thanks for the report! Will fix this soon.