}
}
+static inline int
+ifa_same(struct ifa *a, struct ifa *b)
+{
+ return ipa_equal(a->ip, b->ip) && ipa_equal(a->prefix, b->prefix) &&
+ a->pxlen == b->pxlen;
+}
+
/**
* ifa_update - update interface address
struct ifa *b;
WALK_LIST(b, i->addrs)
- if (ipa_equal(b->ip, a->ip))
+ if (ifa_same(b, a))
{
- if (ipa_equal(b->prefix, a->prefix) &&
- b->pxlen == a->pxlen &&
- ipa_equal(b->brd, a->brd) &&
+ if (ipa_equal(b->brd, a->brd) &&
ipa_equal(b->opposite, a->opposite) &&
b->scope == a->scope &&
!((b->flags ^ a->flags) & IA_PEER))
struct ifa *b;
WALK_LIST(b, i->addrs)
- if (ipa_equal(b->ip, a->ip))
+ if (ifa_same(b, a))
{
rem_node(&b->n);
if (b->flags & IF_UP)