Source-Changes-HG archive

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

[src/netbsd-7]: src Pull up following revision(s) (requested by khorben in ti...



details:   https://anonhg.NetBSD.org/src/rev/8dd177018545
branches:  netbsd-7
changeset: 799184:8dd177018545
user:      snj <snj%NetBSD.org@localhost>
date:      Fri Apr 10 20:26:46 2015 +0000

description:
Pull up following revision(s) (requested by khorben in ticket #671):
        external/bsd/ipf/dist/lib/interror.c: revision 1.4
        sys/external/bsd/ipf/netinet/fil.c: revision 1.16
Fix for PR kern/48109 (and its duplicate kern/49807)
As provided by Takahiro HAYASHI in PR kern/48109. Additional error
registration in ipf(8) by myself. Changes tested with GENERIC and
XEN3_DOM0. Thanks!

diffstat:

 external/bsd/ipf/dist/lib/interror.c |  5 +++--
 sys/external/bsd/ipf/netinet/fil.c   |  9 +++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diffs (56 lines):

diff -r 0d27b2bc01ea -r 8dd177018545 external/bsd/ipf/dist/lib/interror.c
--- a/external/bsd/ipf/dist/lib/interror.c      Fri Apr 10 20:22:42 2015 +0000
+++ b/external/bsd/ipf/dist/lib/interror.c      Fri Apr 10 20:26:46 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: interror.c,v 1.3 2013/05/08 18:20:14 christos Exp $    */
+/*     $NetBSD: interror.c,v 1.3.6.1 2015/04/10 20:26:46 snj Exp $     */
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -19,7 +19,7 @@
 
 static ipf_error_entry_t *find_error __P((int));
 
-#define        IPF_NUM_ERRORS  475
+#define        IPF_NUM_ERRORS  476
 
 /*
  * NO REUSE OF NUMBERS!
@@ -179,6 +179,7 @@
        {       149,    "object size validation failed for kernel copyout" },
        {       150,    "error copying data out for kernel copyout" },
        {       151,    "version mismatch for kernel copyout" },
+       {       152,    "direction does not match the group rule" },
 /* -------------------------------------------------------------------------- */
        {       10001,  "could not find token for auth iterator" },
        {       10002,  "write permissions require to add/remove auth rule" },
diff -r 0d27b2bc01ea -r 8dd177018545 sys/external/bsd/ipf/netinet/fil.c
--- a/sys/external/bsd/ipf/netinet/fil.c        Fri Apr 10 20:22:42 2015 +0000
+++ b/sys/external/bsd/ipf/netinet/fil.c        Fri Apr 10 20:26:46 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fil.c,v 1.15 2014/06/16 12:38:32 christos Exp $        */
+/*     $NetBSD: fil.c,v 1.15.2.1 2015/04/10 20:26:46 snj Exp $ */
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -138,7 +138,7 @@
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.15 2014/06/16 12:38:32 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.15.2.1 2015/04/10 20:26:46 snj Exp $");
 #else
 static const char sccsid[] = "@(#)fil.c        1.36 6/5/96 (C) 1993-2000 Darren Reed";
 static const char rcsid[] = "@(#)Id: fil.c,v 1.1.1.2 2012/07/22 13:45:07 darrenr Exp $";
@@ -4495,6 +4495,11 @@
                        if (addrem == 0) {
                                fg = ipf_group_add(softc, group, NULL,
                                                   fp->fr_flags, unit, set);
+                               if (fg == NULL) {
+                                       IPFERROR(152);
+                                       error = ESRCH;
+                                       goto donenolock;
+                               }
                                fp->fr_grp = fg;
                        } else {
                                fg = ipf_findgroup(softc, group, unit,



Home | Main Index | Thread Index | Old Index