summaryrefslogtreecommitdiff
path: root/sysdep/linux
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/linux')
-rw-r--r--sysdep/linux/netlink.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c
index d773743d..56337e01 100644
--- a/sysdep/linux/netlink.c
+++ b/sysdep/linux/netlink.c
@@ -860,6 +860,7 @@ nl_parse_addr4(struct ifaddrmsg *i, int scan, int new)
{
struct rtattr *a[BIRD_IFA_MAX];
struct iface *ifi;
+ struct kif_iface_config *kifi;
u32 ifa_flags;
int scope;
@@ -883,6 +884,12 @@ nl_parse_addr4(struct ifaddrmsg *i, int scan, int new)
log(L_ERR "KIF: Received address message for unknown interface %d", i->ifa_index);
return;
}
+ kifi = kif_get_iface_config(ifi);
+ if (kifi->flags & KIF_IGNORE)
+ {
+ log(L_ERR "KIF: Ignored interface %s", ifi->name);
+ return;
+ }
if (a[IFA_FLAGS])
ifa_flags = rta_get_u32(a[IFA_FLAGS]);
@@ -902,6 +909,11 @@ nl_parse_addr4(struct ifaddrmsg *i, int scan, int new)
log(L_ERR "KIF: Invalid prefix length for interface %s: %d", ifi->name, i->ifa_prefixlen);
new = 0;
}
+/* if (ipa_equal(ifa.ip, ipa_from_u32(0x0a000001)))
+ {
+ log(L_ERR "KIF: Ignore IP address %I", ifa.ip);
+ new = 0;
+ }*/
if (i->ifa_prefixlen == IP4_MAX_PREFIX_LENGTH)
{
ifa.brd = rta_get_ipa(a[IFA_ADDRESS]);