diff options
| author | Daniel Walton <dwalton@cumulusnetworks.com> | 2016-06-08 17:49:09 -0700 |
|---|---|---|
| committer | Daniel Walton <dwalton@cumulusnetworks.com> | 2016-06-08 17:49:09 -0700 |
| commit | b7b71de5fe090dbc85616a424d5613e75ba8c8b7 (patch) | |
| tree | d030e983dea860e8ea80bb72f10908af11ca0d9d /lib/plist.c | |
| parent | 5d1a88075a408acec53cb9b027e9955150581a0e (diff) | |
| parent | 4f87aceb78dcec9a88860d92c3657fcbeb46e845 (diff) | |
Merge branch 'cmaster-next' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster-next
Diffstat (limited to 'lib/plist.c')
| -rw-r--r-- | lib/plist.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/plist.c b/lib/plist.c index 12c71791ce..a1289801c4 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -922,8 +922,9 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name, } /* "any" is special token for matching any IPv4 addresses. */ - if (afi == AFI_IP) + switch (afi) { + case AFI_IP: if (strncmp ("any", prefix, strlen (prefix)) == 0) { ret = str2prefix_ipv4 ("0.0.0.0/0", (struct prefix_ipv4 *) &p); @@ -939,10 +940,8 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name, vty_out (vty, "%% Malformed IPv4 prefix%s", VTY_NEWLINE); return CMD_WARNING; } - } -#ifdef HAVE_IPV6 - else if (afi == AFI_IP6) - { + break; + case AFI_IP6: if (strncmp ("any", prefix, strlen (prefix)) == 0) { ret = str2prefix_ipv6 ("::/0", (struct prefix_ipv6 *) &p); @@ -958,8 +957,8 @@ vty_prefix_list_install (struct vty *vty, afi_t afi, const char *name, vty_out (vty, "%% Malformed IPv6 prefix%s", VTY_NEWLINE); return CMD_WARNING; } + break; } -#endif /* HAVE_IPV6 */ /* ge and le check. */ if (genum && (genum <= p.prefixlen)) |
