]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: fix bogus ifalias on network device
authorStephen Hemminger <stephen@networkplumber.org>
Thu, 24 May 2018 01:02:00 +0000 (18:02 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 May 2018 03:06:33 +0000 (23:06 -0400)
commit3dc38313dced7cdde0d7aaffe8fa0ac12134fad3
tree00b4ca9906e4205a3ca11c57825168a0d023b0f2
parent100f0be98ab9907e6fb682f7cfa5bd83b47fe64a
hv_netvsc: fix bogus ifalias on network device

If the guest network adapter is not configured with DeviceNaming
enabled on the host, then the query for friendly name will return
success but with a zero length name. Which then leads to a garbage value
(stack contents) for ifalias.

Fix is simple, just don't set name if  host doesn't return it.

Fixes: e3247e983c66 ("hv_netvsc: propogate Hyper-V friendly name into interface alias")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/rndis_filter.c