From fe8dee1062d73e144cd4cf81039ad5351447896a Mon Sep 17 00:00:00 2001 From: Hartmut Brandt Date: Tue, 15 Jul 2003 15:51:50 +0000 Subject: [PATCH] Instead of returning an error call the ioctl() handler of the interface when we get request that we cannot handle ourself. This allows userland to reach the ATM interfaces for ioctls. --- sys/netnatm/natm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/netnatm/natm.c b/sys/netnatm/natm.c index e9bb5841176..2a5d5479836 100644 --- a/sys/netnatm/natm.c +++ b/sys/netnatm/natm.c @@ -381,9 +381,12 @@ natm_usr_control(struct socket *so, u_long cmd, caddr_t arg, else npcb->npcb_flags &= ~(NPCB_RAW); } + } else { + splx(s); + if (ifp == NULL || ifp->if_ioctl == NULL) + return (EOPNOTSUPP); + return ((*ifp->if_ioctl)(ifp, cmd, arg)); } - else - error = EOPNOTSUPP; out: splx(s);