]> git.baikalelectronics.ru Git - kernel.git/commit
ip_tunnel: return more precise errno value when adding tunnel fails
authorFlorian Westphal <fw@strlen.de>
Fri, 14 Feb 2014 12:14:39 +0000 (13:14 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Feb 2014 05:07:09 +0000 (00:07 -0500)
commitfc0e1b047f453a393d352f0ef4a9242c1cbcd19c
tree0429d81631a0790eba095bf60d86725d679bc734
parent4a5ab2f309f420e386b43ba403f5efbeb6842a94
ip_tunnel: return more precise errno value when adding tunnel fails

Currently this always returns ENOBUFS, because the return value of
__ip_tunnel_create is discarded.

A more common failure is a duplicate name (EEXIST).  Propagate the real
error code so userspace can display a more meaningful error message.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_tunnel.c