Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zebra: null check re->nhe not re->nhe->nhg on attach
We should be NULL checking the entire re->nhe struct, not the group inside of it. When we get routes from the kernel using a nexthop group (and future protocols) they will only pass us an ID to use. Hence, this struct can (and will be) NULL on first attach when only passed an ID. There shouldn't be a situation where we have an re->nhe and don't have an re->nhe->nhg anyway. Before this patch you can easily make zebra crash by creating a route in the kernel using a nexthop group and starting zebra. `ip next add dev lo id 111` `ip route add 1.1.1.1/32 nhid 111` Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
- Loading branch information