Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-compat]: src/sys/net Don't accept OIFLIST operation unless the ...
details: https://anonhg.NetBSD.org/src/rev/23d638ba6aa2
branches: pgoyette-compat
changeset: 447441:23d638ba6aa2
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Fri Jan 11 07:55:53 2019 +0000
description:
Don't accept OIFLIST operation unless the rtsock_70_hook is loaded,
even though the results are otherwise identical to those on current.
diffstat:
sys/net/rtsock.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r e2188f8005b3 -r 23d638ba6aa2 sys/net/rtsock.c
--- a/sys/net/rtsock.c Fri Jan 11 06:27:45 2019 +0000
+++ b/sys/net/rtsock.c Fri Jan 11 07:55:53 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtsock.c,v 1.238.2.14 2019/01/11 06:27:45 pgoyette Exp $ */
+/* $NetBSD: rtsock.c,v 1.238.2.15 2019/01/11 07:55:53 pgoyette Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.238.2.14 2019/01/11 06:27:45 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.238.2.15 2019/01/11 07:55:53 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1839,8 +1839,13 @@
info.rti_info[RTAX_IFP] = NULL;
if (w->w_where && w->w_tmem && w->w_needed <= 0) {
switch (type) {
+ case NET_RT_OIFLIST: /* old _70 */
+ if (rtsock_70_hook.f1 == NULL) {
+ error = EINVAL;
+ break;
+ }
+ /* FALLTHROUGH */
case NET_RT_IFLIST: /* current */
- case NET_RT_OIFLIST: /* old _70 */
error = sysctl_iflist_if(ifp, w, &info, len);
break;
case NET_RT_OOIFLIST: /* old _50 */
Home |
Main Index |
Thread Index |
Old Index