]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge commit '32425297' into thread-next
authorMaria Matejka <mq@ucw.cz>
Mon, 7 Nov 2022 09:25:52 +0000 (10:25 +0100)
committerMaria Matejka <mq@ucw.cz>
Mon, 7 Nov 2022 09:25:52 +0000 (10:25 +0100)
1  2 
sysdep/linux/netlink.c

index 3443957b4ec8b9397829185d441dc0041f3f5298,d9e81c104ac42bbfd448e2b652c625c5a9c623c8..8168d0dc6d5e6e897a5537a51fc72b51a07283ec
@@@ -1809,26 -1705,26 +1809,26 @@@ nl_parse_route(struct nl_parse_state *s
  
  #ifdef HAVE_MPLS_KERNEL
        if (a[RTA_VIA])
 -      ra->nh.gw = rta_get_via(a[RTA_VIA]);
 +      nhad.nh.gw = rta_get_via(a[RTA_VIA]);
  #endif
  
 -      ra->nh.flags |= RNF_ONLINK;
+       if (i->rtm_flags & RTNH_F_ONLINK)
 -      if (ipa_nonzero(ra->nh.gw))
++      nhad.nh.flags |= RNF_ONLINK;
 +      if (ipa_nonzero(nhad.nh.gw))
        {
          /* Silently skip strange 6to4 routes */
          const net_addr_ip6 sit = NET_ADDR_IP6(IP6_NONE, 96);
 -        if ((i->rtm_family == AF_INET6) && ipa_in_netX(ra->nh.gw, (net_addr *) &sit))
 +        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, ra->nh.gw, ra->nh.iface,
 -                         (ra->nh.flags & RNF_ONLINK) ? NEF_ONLINK : 0);
 +        nbr = neigh_find(&p->p, nhad.nh.gw, nhad.nh.iface,
 +                         (nhad.nh.flags & RNF_ONLINK) ? NEF_ONLINK : 0);
          if (!nbr || (nbr->scope == SCOPE_HOST))
            {
 -            log(L_ERR "KRT: Received route %N with strange next-hop %I", net->n.addr,
 -                  ra->nh.gw);
 +            log(L_ERR "KRT: Received route %N with strange next-hop %I", net,
 +                  nhad.nh.gw);
              return;
            }
        }