Re: [PATCH net-next v4 2/2] bridge: vlan: signal if anything changed on vlan add

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26/10/17 13:16, Toshiaki Makita wrote:
> On 2017/10/26 7:52, Nikolay Aleksandrov wrote:
> ...
>> @@ -559,6 +574,7 @@ int br_vlan_add(struct net_bridge *br, u16 vid, u16 flags)
>>  
>>  	ASSERT_RTNL();
>>  
>> +	*changed = false;
>>  	vg = br_vlan_group(br);
>>  	vlan = br_vlan_find(vg, vid);
>>  	if (vlan) {
>> @@ -576,9 +592,12 @@ int br_vlan_add(struct net_bridge *br, u16 vid, u16 flags)
>>  			refcount_inc(&vlan->refcnt);
>>  			vlan->flags |= BRIDGE_VLAN_INFO_BRENTRY;
>>  			vg->num_vlans++;
>> +			*changed = true;
>>  		}
>> -		__vlan_add_flags(vlan, flags);
>> -		return 0;
>> +		if (__vlan_add_flags(vlan, flags))
>> +			*changed = true;
>> +
>> +		return ret;
> 
> "ret" isn't always initialized here, is it?
> 
> 
> Toshiaki Makita

Oh, good catch! Right you are, weird that there was no warning even with W=1 as
I always check that before sending a set.

Thanks,
 Nik








[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux