diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2018-09-11 21:09:47 +0000 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2019-02-27 21:28:44 +0100 |
commit | e14052f9640f0e0b7eb2edf0148591d0eb214fb7 (patch) | |
tree | 02e93ca61135089f5a011d70f28896e949899e24 /sysdep/linux | |
parent | 7c36eb3e8bd7d06f65dc7319d42b6abe782c5b89 (diff) |
WIP ignore interfaceold/ignore-interface
Diffstat (limited to 'sysdep/linux')
-rw-r--r-- | sysdep/linux/netlink.c | 12 |
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]); |