summaryrefslogtreecommitdiff
path: root/sysdep/linux/netlink.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-11-07 10:25:52 +0100
committerMaria Matejka <mq@ucw.cz>2022-11-07 10:25:52 +0100
commit40bae8e1b788a535466ac673629fc93b6a258576 (patch)
tree1e67fc4ace3462d7982c7188cdee80988a2dd85e /sysdep/linux/netlink.c
parent54179a1ab38542e7087db37bfe3de9d32886c78e (diff)
parent324252975004154cc70623c94f05083bff100209 (diff)
Merge commit '32425297' into thread-next
Diffstat (limited to 'sysdep/linux/netlink.c')
-rw-r--r--sysdep/linux/netlink.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c
index 3443957b..8168d0dc 100644
--- a/sysdep/linux/netlink.c
+++ b/sysdep/linux/netlink.c
@@ -921,11 +921,11 @@ nl_parse_multipath(struct nl_parse_state *s, struct krt_proto *p, const net_addr
rv->gw = rta_get_via(a[RTA_VIA]);
#endif
+ if (nh->rtnh_flags & RTNH_F_ONLINK)
+ rv->flags |= RNF_ONLINK;
+
if (ipa_nonzero(rv->gw))
{
- if (nh->rtnh_flags & RTNH_F_ONLINK)
- rv->flags |= RNF_ONLINK;
-
neighbor *nbr;
nbr = neigh_find(&p->p, rv->gw, rv->iface,
(rv->flags & RNF_ONLINK) ? NEF_ONLINK : 0);
@@ -1812,6 +1812,9 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h)
nhad.nh.gw = rta_get_via(a[RTA_VIA]);
#endif
+ if (i->rtm_flags & RTNH_F_ONLINK)
+ nhad.nh.flags |= RNF_ONLINK;
+
if (ipa_nonzero(nhad.nh.gw))
{
/* Silently skip strange 6to4 routes */
@@ -1819,9 +1822,6 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h)
if ((i->rtm_family == AF_INET6) && ipa_in_netX(nhad.nh.gw, (net_addr *) &sit))
return;
- if (i->rtm_flags & RTNH_F_ONLINK)
- nhad.nh.flags |= RNF_ONLINK;
-
neighbor *nbr;
nbr = neigh_find(&p->p, nhad.nh.gw, nhad.nh.iface,
(nhad.nh.flags & RNF_ONLINK) ? NEF_ONLINK : 0);