diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-04-17 05:15:56 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-04-17 05:15:56 +0200 |
commit | 1019731833f2f5a5b6b28d0909df4895cc388398 (patch) | |
tree | 73ee1e4ee90798a3306ec09077f88c5199c0e4c5 /ospf6d | |
parent | Merge pull request #4147 from mjstapp/fix_pim_zebra_warning (diff) | |
download | frr-1019731833f2f5a5b6b28d0909df4895cc388398.tar.xz frr-1019731833f2f5a5b6b28d0909df4895cc388398.zip |
ospf6d: listhead returns a listnode *
The ospf6_route_get_first_nh_index function call calls
listhead which returns a (listnode *) but we are casting
it to a (struct ospf6_nexthop *) and away we go.
Fixes: #4142
Found By: Kwind
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ospf6d')
-rw-r--r-- | ospf6d/ospf6_route.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index b71b353e1..441a6f367 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -331,8 +331,9 @@ int ospf6_route_get_first_nh_index(struct ospf6_route *route) struct ospf6_nexthop *nh; if (route) { - if ((nh = (struct ospf6_nexthop *)listhead(route->nh_list))) - return (nh->ifindex); + nh = listnode_head(route->nh_list); + if (nh) + return nh->ifindex; } return (-1); |