Source-Changes-HG archive

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

[src/trunk]: src/common/lib/libprop bump to 128K (because of npf large rules)...



details:   https://anonhg.NetBSD.org/src/rev/983357977eb1
branches:  trunk
changeset: 820803:983357977eb1
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jan 15 18:15:45 2017 +0000

description:
bump to 128K (because of npf large rules) and return E2BIG.

diffstat:

 common/lib/libprop/prop_kern.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 4a820d2f2eff -r 983357977eb1 common/lib/libprop/prop_kern.c
--- a/common/lib/libprop/prop_kern.c    Sun Jan 15 18:03:12 2017 +0000
+++ b/common/lib/libprop/prop_kern.c    Sun Jan 15 18:15:45 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: prop_kern.c,v 1.19 2015/05/11 16:48:34 christos Exp $  */
+/*     $NetBSD: prop_kern.c,v 1.20 2017/01/15 18:15:45 christos Exp $  */
 
 /*-
  * Copyright (c) 2006, 2009 The NetBSD Foundation, Inc.
@@ -384,8 +384,8 @@
 
 #include "prop_object_impl.h"
 
-/* Arbitrary limit ioctl input to 64KB */
-unsigned int prop_object_copyin_limit = 65536;
+/* Arbitrary limit ioctl input to 128KB */
+unsigned int prop_object_copyin_limit = 128 * 1024;
 
 /* initialize proplib for use in the kernel */
 void
@@ -408,7 +408,7 @@
        int error;
 
        if (pref->pref_len >= prop_object_copyin_limit)
-               return EINVAL;
+               return E2BIG;
 
        /*
         * Allocate an extra byte so we can guarantee NUL-termination.



Home | Main Index | Thread Index | Old Index