]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Nest: Do not ignore secondary flag changes in ifa updates
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Fri, 17 Dec 2021 23:58:47 +0000 (00:58 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Sat, 18 Dec 2021 00:09:52 +0000 (01:09 +0100)
Compare all IA_* flags that are set by sysdep iface code.

The old code ignores IA_SECONDARY flag when comparing whether iface
address updates from kernel changed anything. This is usually not an
issue as kernel removes all secondary addresses due to removal of the
primary one, but it breaks when sysctl 'promote_secondaries' is enabled
and kernel promotes secondary addresses to primary ones.

Thanks to 'Alexander' for the bugreport.

nest/iface.c

index 83a633a39ad4eb4d00e20d9ee862f23dfa219be6..682340c56cff227e880187f4d7ac6eabe4795932 100644 (file)
@@ -591,7 +591,7 @@ ifa_update(struct ifa *a)
        if (ipa_equal(b->brd, a->brd) &&
            ipa_equal(b->opposite, a->opposite) &&
            b->scope == a->scope &&
-           !((b->flags ^ a->flags) & IA_PEER))
+           !((b->flags ^ a->flags) & (IA_SECONDARY | IA_PEER | IA_HOST)))
          {
            b->flags |= IA_UPDATED;
            return b;