summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-02-26 10:55:58 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2010-02-26 10:55:58 +0100
commitff2857b03db854f99902766ad842aaa5fa29ec3c (patch)
tree8484bfcabaa9805fab2ae188a6855314192d92e1 /lib
parente81b440f6878605edd19ed62441648ac71260881 (diff)
downloadbird-ff2857b03db854f99902766ad842aaa5fa29ec3c.tar
bird-ff2857b03db854f99902766ad842aaa5fa29ec3c.zip
Many changes in (mainly) kernel syncers.
- BSD kernel syncer is now self-conscious and can learn alien routes - important bugfix in BSD kernel syncer (crash after protocol restart) - many minor changes and bugfixes in kernel syncers and neighbor cache - direct protocol does not generate host and link local routes - min_scope check is removed, all routes have SCOPE_UNIVERSE by default - also fixes some remaining compiler warnings
Diffstat (limited to 'lib')
-rw-r--r--lib/ip.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ip.h b/lib/ip.h
index 5dc9191..e9923e2 100644
--- a/lib/ip.h
+++ b/lib/ip.h
@@ -50,6 +50,10 @@ struct prefix {
};
#define ip_is_prefix(a,l) (!ipa_nonzero(ipa_and(a, ipa_not(ipa_mkmask(l)))))
+#define ipa_zero(x) (!ipa_nonzero(x))
+
+static inline int ipa_classify_net(ip_addr a)
+{ return ipa_zero(a) ? (IADDR_HOST | SCOPE_UNIVERSE) : ipa_classify(a); }
/*
* Conversions between internal and string representation