[dpdk-dev] [PATCH v2] ether: fix invalid string length in ethdev name comparison

Ferruh Yigit ferruh.yigit at intel.com
Wed Mar 7 16:25:16 CET 2018


On 2/27/2018 9:38 AM, Ananyev, Konstantin wrote:
> 
> 
>> -----Original Message-----
>> From: Awal, Mohammad Abdul
>> Sent: Tuesday, February 27, 2018 8:58 AM
>> To: thomas at monjalon.net
>> Cc: rkerur at gmail.com; dev at dpdk.org; Ananyev, Konstantin <konstantin.ananyev at intel.com>; Awal, Mohammad Abdul
>> <mohammad.abdul.awal at intel.com>
>> Subject: [PATCH v2] ether: fix invalid string length in ethdev name comparison
>>
>> The current code compares two strings upto the length of 1st string
>> (searched name). If the 1st string is prefix of 2nd string (existing name),
>> the string comparison returns the port_id of earliest prefix matches.
>> This patch fixes the bug by using strcmp instead of strncmp.
>>
>> Fixes: 9c5b8d8b9fe ("ethdev: clean port id retrieval when attaching")
>>
>> Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal at intel.com>

> Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>

Applied to dpdk-next-net/master, thanks.


More information about the dev mailing list