device: gracefully handle device names exceeding IFNAMESIZ
authorHans Dedecker <dedeckeh@gmail.com>
Sun, 12 Aug 2018 20:08:22 +0000 (22:08 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Tue, 14 Aug 2018 15:06:38 +0000 (17:06 +0200)
Instead of truncating the device name when it exceeds IFNAMSIZ length;
let device_set_ifname return an error code and do not add the device
to the device list.
This avoids possible issues with device names becoming identical due the
truncation and as a result unexpected behavior.
Further let the different device types gracefully handle the error code
returned by device_init

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

No differences found