summaryrefslogtreecommitdiffstats
path: root/ospf6d
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-04-17 05:15:56 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-04-17 05:15:56 +0200
commit1019731833f2f5a5b6b28d0909df4895cc388398 (patch)
tree73ee1e4ee90798a3306ec09077f88c5199c0e4c5 /ospf6d
parentMerge pull request #4147 from mjstapp/fix_pim_zebra_warning (diff)
downloadfrr-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.c5
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);