diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-04-16 23:15:56 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-04-16 23:15:56 -0400 | 
| commit | 1019731833f2f5a5b6b28d0909df4895cc388398 (patch) | |
| tree | 73ee1e4ee90798a3306ec09077f88c5199c0e4c5 /ospf6d/ospf6_route.c | |
| parent | 42452fcbb2523b004908208dcda0db1284c74384 (diff) | |
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/ospf6_route.c')
| -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 b71b353e1f..441a6f3677 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);  | 
