> On Jun 9, 2016, at 9:25 AM, Darrell Ball <dlu...@gmail.com> wrote:
> 
> 
> 
> On Thu, Jun 9, 2016 at 12:12 AM, Justin Pettit <jpet...@ovn.org> wrote:
> A zero prefix length is used to match any IP address, which is useful
> for defining default routes.
> 
> Signed-off-by: Justin Pettit <jpet...@ovn.org>
> ---
>  lib/packets.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/packets.c b/lib/packets.c
> index 6a55d6f..ecb5339 100644
> --- a/lib/packets.c
> +++ b/lib/packets.c
> @@ -442,9 +442,9 @@ ip_parse_masked_len(const char *s, int *n, ovs_be32 *ip,
>          /* OK. */
>      } else if (ovs_scan_len(s, n, IP_SCAN_FMT"/%d",
>                              IP_SCAN_ARGS(ip), &prefix)) {
> -        if (prefix <= 0 || prefix > 32) {
> -            return xasprintf("%s: network prefix bits not between 0 and "
> -                             "32", s);
> +        if (prefix < 0 || prefix > 32) {
> +            return xasprintf("%s: IPv4 network prefix bits not between 0 and 
> "
> +                              "31, inclusive", s);
> 
> 
> Are we are talking number of bits, not bit indices ?

I'm trying specify the width of a CIDR block.  Do you have a suggestion for a 
better way to phrase the error message?

--Justin


_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to