network: check result of if_nametoindex().
network: check result of if_nametoindex().

When we want to get index of a ifname which does not
exist, we should return a -EINVAL in this case.

Signed-off-by: Dongsheng Yang <1b957dfff8d0f16ed124fab3c79d8c1232c34692@cn.fujitsu.com>
Acked-by: Serge E. Hallyn <3df611b026e4639bee8aef7a4beb2e39fcebb313@ubuntu.com>

ss1h2a3tw/lxc,terceiro/lxc,Distrotech/lxc,QingweiPeterLan/cs188-lxc,aeris/lxc,armcc/lxc,DarknessBeforeDawn/lxc,rldleblanc/lxc,hallyn/lxc,JohnPeacockMessageSystems/lxc,christiaan/lxc,hkjolhede/lxc,ysbnim/lxc,caglar10ur/lxc,raspberrypython/lxc,virajs/lxc,virajs/lxc,ioops/lxc,Ponce/lxc,ioops/lxc,fwilson42/lxc,bostjan/lxc,yubo/lxc,federicobriata/lxc,codebauss/lxc,szaszg/lxc,GreatFruitOmsk/lxc,major/lxc,armcc/lxc,ksperis/lxc,lisongmin/lxc,akshaykarle/lxc,hfuCN/lxc,terceiro/lxc,virajs/lxc,rowhit/lxc,major/lxc,sapun/lxc,szaszg/lxc,thmo/lxc,JohnPeacockMessageSystems/lxc,major/lxc,regit/lxc,hallyn/lxc,rowhit/lxc,Distrotech/lxc,efiop/lxc,federicobriata/lxc,codebauss/lxc,Pelagicore/lxc,christiaan/lxc,raspberrypython/lxc,weizhenwei/lxc,federicobriata/lxc,yubo/lxc,cjwatson/lxc,hfuCN/lxc,rldleblanc/lxc,christiaan/lxc,Pelagicore/lxc,lazy404/lxc,GreatFruitOmsk/lxc,regit/lxc,jirislaby/lxc,ecarrara/lxc,weizhenwei/lxc,bmoar/lxc,szaszg/lxc,LynxChaus/lxc,Ponce/lxc,ysbnim/lxc,bmoar/lxc,akshaykarle/lxc,DarknessBeforeDawn/lxc,efiop/lxc,hkjolhede/lxc,QingweiPeterLan/cs188-lxc,bostjan/lxc,ecarrara/lxc,ksperis/lxc,rowhit/lxc,QingweiPeterLan/cs188-lxc,ecarrara/lxc,codebauss/lxc,thmo/lxc,caglar10ur/lxc,Ponce/lxc,lazy404/lxc,fwilson42/lxc,aeris/lxc,tych0/lxc,sapun/lxc,aeris/lxc,sapun/lxc,ysbnim/lxc,hallyn/lxc,terceiro/lxc,fwilson42/lxc,yubo/lxc,regit/lxc,cjwatson/lxc,LynxChaus/lxc,caglar10ur/lxc,JohnPeacockMessageSystems/lxc,lazy404/lxc,tych0/lxc,thmo/lxc,DarknessBeforeDawn/lxc,ksperis/lxc,GreatFruitOmsk/lxc,bmoar/lxc,lisongmin/lxc,akshaykarle/lxc,LynxChaus/lxc,ss1h2a3tw/lxc,Pelagicore/lxc,jirislaby/lxc,rldleblanc/lxc,Distrotech/lxc,hkjolhede/lxc,weizhenwei/lxc,armcc/lxc,hfuCN/lxc,bostjan/lxc,raspberrypython/lxc,cjwatson/lxc,efiop/lxc,ss1h2a3tw/lxc,tych0/lxc,lisongmin/lxc,ioops/lxc,jirislaby/lxc