diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2020-01-03 23:48:36 +0100 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2020-01-22 20:12:15 +0100 |
commit | d35e556c84d775989ba606457da6093c74b1bd3f (patch) | |
tree | ad1cf9bbf3b97dc2bfd710648b7469bdbe49f062 | |
parent | Merge pull request #5710 from opensourcerouting/fix_centos6 (diff) | |
download | frr-d35e556c84d775989ba606457da6093c74b1bd3f.tar.xz frr-d35e556c84d775989ba606457da6093c74b1bd3f.zip |
lib: add macro to check if value is valid afi
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
-rw-r--r-- | lib/zebra.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/zebra.h b/lib/zebra.h index 00d422cdd..b2f0202c5 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -360,6 +360,8 @@ typedef enum { AFI_MAX = 4 } afi_t; +#define IS_VALID_AFI(a) ((a) > AFI_UNSPEC && (a) < AFI_MAX) + /* Subsequent Address Family Identifier. */ typedef enum { SAFI_UNSPEC = 0, |