r299512 breaks dhclient on some networks
Don Lewis
truckman at FreeBSD.org
Thu May 19 00:56:50 UTC 2016
On 18 May, To: cem at FreeBSD.org wrote:
> On 18 May, Conrad Meyer wrote:
>> Hey Ian,
>>
>> r299512 incorrectly encoded client identifiers because I misunderstood
>> the intent of the sizeof()-scaled client_id. I reverted that change
>> and replaced it with r300174, which I believe fixes the first overrun
>> more correctly.
>>
>> (Coverity may still complain about CID 1305550, but I don't believe
>> it's valid for 'hlen' to exceed sizeof(hw_addr.haddr).)
>
> It's not, but the MIN() doesn't hurt. Coverity may no longer complain
> though because your change may think that hlen is only 16 at this point
> since that is what the earlier change tests against.
>
> If it is checked in one place, it should probably be checked in both, or
> you could just add an assert() to check it ...
If you removed the tests in both places, Coverity would probably just
assume that everything is just fine and dandy ...
More information about the freebsd-current
mailing list