How about this one below? without modifying the return value:
__u8 neigh_flags = 0;
neigh = dst_neigh_lookup(&rt->dst,
&rt->rt6i_gateway);
- if (neigh) {
+ if (!IS_ERR(neigh)) {
neigh_flags = neigh->flags;
neigh_release(neigh);
}
you are correct, this one avoid breaking out of the process of the fib
table traveling
Zhouyi