Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/common The if43_20_hook function returns an errno...



details:   https://anonhg.NetBSD.org/src/rev/44c0a8417d39
branches:  trunk
changeset: 447943:44c0a8417d39
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Tue Jan 29 04:01:45 2019 +0000

description:
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.

diffstat:

 sys/compat/common/if_43.c |  13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 478c90bc62af -r 44c0a8417d39 sys/compat/common/if_43.c
--- a/sys/compat/common/if_43.c Mon Jan 28 21:19:09 2019 +0000
+++ b/sys/compat/common/if_43.c Tue Jan 29 04:01:45 2019 +0000
@@ -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 @@
                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;
+                   }
                }
        }
 }



Home | Main Index | Thread Index | Old Index