> On Jul 19, 2016, at 10:49 PM, Ben Pfaff <b...@ovn.org> wrote:
> 
> On Tue, Jul 19, 2016 at 10:16:12PM -0700, Justin Pettit wrote:
>> 
>> diff --git a/lib/packets.h b/lib/packets.h
>> index 02028c9..8f11e2c 100644
>> --- a/lib/packets.h
>> +++ b/lib/packets.h
>> @@ -980,10 +980,16 @@ in6_generate_lla(struct eth_addr ea, struct in6_addr 
>> *lla)
>>     taddr->be16[7] = ea.be16[2];
>> }
>> 
>> +/* Returns true if 'addr' is a link local address.  Otherwise, false. */
>> static inline bool
>> in6_is_lla(struct in6_addr *addr)
>> {
>> +#ifdef s6_addr32
>>     return addr->s6_addr32[0] == htonl(0xfe800000) && !(addr->s6_addr32[1]);
>> +#else
>> +    return addr->s6_addr[0] == htons(0xfe80) &&
>> +         !(addr->s6_addr[1] | addr->s6_addr[2] | addr->s6_addr[3]);
>> +#endif
>> }
> 
> Isn't s6_addr[] an array of bytes?  I don't think that comparing against
> htons(...) is going to do anything sensible.

Ah, crap.  I made a bad assumption, and then it build cleanly when I forced it 
to take that code, so I thought I was good.

I'll send out a revised patch.

--Justin


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

Reply via email to