static int bridge_table_get(unsigned int vrf_id, struct vr_route_req *rt) { struct vr_nexthop *nh; rt->rtr_req.rtr_nh_id = NH_DISCARD_ID; nh = bridge_table_lookup(vrf_id, rt, NULL); if (nh) rt->rtr_req.rtr_nh_id = nh->nh_id; return 0; }
static int bridge_table_get(unsigned int vrf_id, struct vr_route_req *rt) { struct vr_nexthop *nh; nh = bridge_table_lookup(vrf_id, rt); if (nh) rt->rtr_req.rtr_nh_id = rt->rtr_nh->nh_id; return -ENOENT; }