netlink: update rta_multipath conditions in arp/ndp after 656a39c1a0

This commit is contained in:
Alexander V. Chernikov 2023-05-27 13:25:16 +00:00
parent 30376771fc
commit c90901245e
2 changed files with 2 additions and 2 deletions

View file

@ -130,7 +130,7 @@ guess_ifindex(struct snl_state *ss, uint32_t fibnum, struct in_addr addr)
if (!snl_parse_nlmsg(ss, hdr, &snl_rtm_route_parser, &r))
return (0);
if (r.rta_multipath || (r.rta_rtflags & RTF_GATEWAY))
if (r.rta_multipath.num_nhops > 0 || (r.rta_rtflags & RTF_GATEWAY))
return (0);
/* Check if the interface is of supported type */

View file

@ -167,7 +167,7 @@ guess_ifindex(struct snl_state *ss, uint32_t fibnum, const struct sockaddr_in6 *
if (!snl_parse_nlmsg(ss, hdr, &snl_rtm_route_parser, &r))
return (0);
if (r.rta_multipath || (r.rta_rtflags & RTF_GATEWAY))
if (r.rta_multipath.num_nhops > 0 || (r.rta_rtflags & RTF_GATEWAY))
return (0);
/* Check if the interface is of supported type */