Module Name: src Committed By: pgoyette Date: Tue Jan 29 04:01:45 UTC 2019
Modified Files: src/sys/compat/common: if_43.c Log Message: The if43_20_hook function returns an errno; use it to determine whether to allow conversion of the ioctl cmd --> ncmd Should address issue reported by msaitoh@ on irc as well as via e-mail from Patrick Welche and Ryo ONODERA. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/compat/common/if_43.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/compat/common/if_43.c diff -u src/sys/compat/common/if_43.c:1.16 src/sys/compat/common/if_43.c:1.17 --- src/sys/compat/common/if_43.c:1.16 Sun Jan 27 02:08:39 2019 +++ src/sys/compat/common/if_43.c Tue Jan 29 04:01:45 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_43.c,v 1.16 2019/01/27 02:08:39 pgoyette Exp $ */ +/* $NetBSD: if_43.c,v 1.17 2019/01/29 04:01:45 pgoyette Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1990, 1993 @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.16 2019/01/27 02:08:39 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.17 2019/01/29 04:01:45 pgoyette Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -212,8 +212,13 @@ compat_cvtcmd(u_long cmd) case TAPGIFNAME: return ncmd; default: - MODULE_CALL_HOOK(if43_20_hook, (ncmd), enosys(), ncmd); - return ncmd; + { int rv; + + MODULE_CALL_HOOK(if43_20_hook, (ncmd), enosys(), rv); + if (rv == 0) + return ncmd; + return cmd; + } } } }