Subject: Re: contributions to iproute2

From: Vadim Kochan <[email-masked]>
Date: Sat, 21 Mar 2015 08:25:37 +0200

On Fri, Mar 20, 2015 at 11:14:04PM -0500, Joe Harvell wrote:
> Thanks, Stephen.
> 
> The bugfix is attached as fix-broken-get_prefix_1.diff with the following
> commit log:
> 
> commit 415464c94a62cfaa9c5ba493e45ce24a58d2118a
> Author: Joe Harvell <[email-masked]>
> Date:   Fri Mar 20 15:08:51 2015 -0500
> 
>      Fixing obvious error of passing in the wrong variable for the family
> parameter
>      of af_bit_len.
> 
> I assume master must have some new change because this fix was needed for a
> basic 'ip addr add 10.0.3.1/24 dev dumbo label foo' command I pased in.  In
> this case, 'family' passed into get_addr_1 two lines above is zero, causing
> get_addr_1 to detect the family from the address and populate the result in
> the family field in dst.  But then instead of passing in the result, family
> (still 0) is passed in to af_bit_len. Without my change, the above command
> complains that 10.0.3.1/24 is not an address prefix.  With the change it
> works fine as expected.
> 
Hi,

Thanks for catching it, this is a serious issue.

Does not the diff should be ?

-               dst->bitlen = af_bit_len(family);
+               dst->bitlen = af_bit_len(dst->family);

Also you can use 'git send-email' to send separate patchs as email,
instead of attaching them.

Regards,