summaryrefslogtreecommitdiff
path: root/lib/prefix.h
diff options
context:
space:
mode:
authorDenis Ovsienko <infrastation@yandex.ru>2011-12-17 19:39:30 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2012-01-02 18:37:42 +0400
commit733cd9e5792648de50da3c00805aacb51cb27048 (patch)
tree606ec20aa51f16b7a49fd9f5ede27893bee9ace9 /lib/prefix.h
parentde5ccb96023181765c9904ab40e645c397f536d6 (diff)
bgpd: justify checks for IPv4 class D/E
* lib/prefix.h * IPV4_CLASS_DE(): make consistent with counterpart macros * bgp_packet.c * bgp_open_receive(): test using macro instead of ">=" * bgp_route.c * bgp_update_rsclient(): idem * bgp_update_main(): idem
Diffstat (limited to 'lib/prefix.h')
-rw-r--r--lib/prefix.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/prefix.h b/lib/prefix.h
index 12c0d07e..dab4202e 100644
--- a/lib/prefix.h
+++ b/lib/prefix.h
@@ -112,7 +112,7 @@ struct prefix_rd
#define IPV4_NET0(a) ((((u_int32_t) (a)) & 0xff000000) == 0x00000000)
#define IPV4_NET127(a) ((((u_int32_t) (a)) & 0xff000000) == 0x7f000000)
#define IPV4_LINKLOCAL(a) ((((u_int32_t) (a)) & 0xffff0000) == 0xa9fe0000)
-#define IPV4_CLASS_DE(a) ((u_int32_t) (a) >= 0xe0000000)
+#define IPV4_CLASS_DE(a) ((((u_int32_t) (a)) & 0xe0000000) == 0xe0000000)
/* Max bit/byte length of IPv6 address. */
#define IPV6_MAX_BYTELEN 16