}
static void
-ifa_notify_change_dep(unsigned c, struct ifa *a)
+ifa_notify_change_(unsigned c, struct ifa *a)
{
struct proto *p;
static inline void
ifa_notify_change(unsigned c, struct ifa *a)
{
- neigh_ifa_update(a);
- ifa_notify_change_dep(c, a);
+ if (c & IF_CHANGE_DOWN)
+ neigh_ifa_update(a);
+
+ ifa_notify_change_(c, a);
+
+ if (c & IF_CHANGE_UP)
+ neigh_ifa_update(a);
}
static inline void
if_dump(i);
#endif
- if (c & IF_CHANGE_UP)
- neigh_if_up(i);
+ if (c & IF_CHANGE_DOWN)
+ neigh_if_down(i);
if (c & IF_CHANGE_DOWN)
WALK_LIST(a, i->addrs)
{
a->flags = (i->flags & ~IA_FLAGS) | (a->flags & IA_FLAGS);
- ifa_notify_change_dep(IF_CHANGE_DOWN, a);
+ ifa_notify_change_(IF_CHANGE_DOWN, a);
}
WALK_LIST(p, active_proto_list)
WALK_LIST(a, i->addrs)
{
a->flags = (i->flags & ~IA_FLAGS) | (a->flags & IA_FLAGS);
- ifa_notify_change_dep(IF_CHANGE_UP, a);
+ ifa_notify_change_(IF_CHANGE_UP, a);
}
+ if (c & IF_CHANGE_UP)
+ neigh_if_up(i);
+
if ((c & (IF_CHANGE_UP | IF_CHANGE_DOWN | IF_CHANGE_LINK)) == IF_CHANGE_LINK)
neigh_if_link(i);
-
- if (c & IF_CHANGE_DOWN)
- neigh_if_down(i);
}
static unsigned
}
/**
- * if_delete - remove interface
- * @old: interface
+ * if_delete - remove interface
+ * @old: interface
*
* This function is called by the low-level platform dependent code
* whenever it notices an interface disappears. It is just a shorthand
if ((a->flags & IA_PEER) &&
ipa_in_net(a->opposite, p->prefix, p->pxlen))
return pos;
-
+
continue;
}