diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2015-03-16 15:56:05 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-17 15:01:18 -0400 |
commit | 37355565ba57fd45f78f0934305be2761b641f8f (patch) | |
tree | a27e5012a75f82be3c1956720ffa0b0b61bf887b /net/ipv4/inet_connection_sock.c | |
parent | ad41faa88e39af451427c921a0f8b441e104b6fa (diff) | |
download | linux-next-37355565ba57fd45f78f0934305be2761b641f8f.tar.gz |
ip6_tunnel: fix error code when tunnel exists
After commit 2b0bb01b6edb, the kernel returns -ENOBUFS when user tries to add
an existing tunnel with ioctl API:
$ ip -6 tunnel add ip6tnl1 mode ip6ip6 dev eth1
add tunnel "ip6tnl0" failed: No buffer space available
It's confusing, the right error is EEXIST.
This patch also change a bit the code returned:
- ENOBUFS -> ENOMEM
- ENOENT -> ENODEV
Fixes: 2b0bb01b6edb ("ip6_tunnel: Return an error when adding an existing tunnel.")
CC: Steffen Klassert <steffen.klassert@secunet.com>
Reported-by: Pierre Cheynier <me@pierre-cheynier.net>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_connection_sock.c')
0 files changed, 0 insertions, 0 deletions