[net-next,8/8] l2tp: let pppol2tp_ioctl() fallback to dev_ioctl()

Message ID 40b766e435a4a64c99b72e6f6f1430bfa94f3b2d.1533895306.git.g.nault@alphalink.fr
State Accepted
Delegated to: David Miller
Headers show
Series
  • l2tp: rework pppol2tp ioctl handling
Related show

Commit Message

Guillaume Nault Aug. 10, 2018, 11:22 a.m.
Return -ENOIOCTLCMD for unknown ioctl commands. This lets dev_ioctl()
handle generic socket ioctls like SIOCGIFNAME or SIOCGIFINDEX.
PF_PPPOX/PX_PROTO_OL2TP was one of the few socket types not honouring
this mechanism.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
---
 net/l2tp/l2tp_ppp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index e2eea60bf875..62f2d3f1e431 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -1137,7 +1137,7 @@  static int pppol2tp_ioctl(struct socket *sock, unsigned int cmd,
 		break;
 
 	default:
-		return -ENOSYS;
+		return -ENOIOCTLCMD;
 	}
 
 	return 0;