Re: [ovs-dev] [PATCH V2] fix sign extension bug in ifr_flags on FreeBSD

2015-04-05 Thread Ben Pfaff
On Sun, Apr 05, 2015 at 12:59:26AM +0800, Kevin Lo wrote: > FreeBSD fills the int return value with ifr_flagshigh in the high > 16 bits and ifr_flags in the low 16 bits rather than blindly promoting > ifr_flags to an int, which will preserve the sign. > This commit makes sure the flags returned isn

[ovs-dev] [PATCH V2] fix sign extension bug in ifr_flags on FreeBSD

2015-04-04 Thread Kevin Lo
FreeBSD fills the int return value with ifr_flagshigh in the high 16 bits and ifr_flags in the low 16 bits rather than blindly promoting ifr_flags to an int, which will preserve the sign. This commit makes sure the flags returned isn't negative and apply mask 0x to flags. Signed-off-by: Kevin