Pull up following revision(s) (requested by bouyer in ticket #1399):
sys/external/bsd/ipf/netinet/fil.c: revision 1.31 sys/external/bsd/ipf/netinet/ip_fil_netbsd.c: revision 1.32 sys/external/bsd/ipf/netinet/ip_fil_netbsd.c: revision 1.33 Fix 2 bugs, reported by Edgar Fuss on tech-net@ - pfil_run_hooks() can be called recursively, so we have to #define FASTROUTE_RECURSION in fil.c - ip6_if_output()/nd6_output() will free the mbuf on error, to make sure to set *mpp to NULL so the caller won't try to free it again. fix double space in comment
This commit is contained in:
parent
6d4a2737c7
commit
a640e1f18f
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fil.c,v 1.20.4.3 2019/08/09 19:21:04 martin Exp $ */
|
||||
/* $NetBSD: fil.c,v 1.20.4.4 2019/10/04 11:28:49 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2012 by Darren Reed.
|
||||
|
@ -138,7 +138,7 @@ extern struct timeout ipf_slowtimer_ch;
|
|||
#if !defined(lint)
|
||||
#if defined(__NetBSD__)
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.20.4.3 2019/08/09 19:21:04 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.20.4.4 2019/10/04 11:28:49 martin 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 $";
|
||||
|
@ -152,6 +152,8 @@ extern int opts;
|
|||
extern int blockreason;
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#define FASTROUTE_RECURSION
|
||||
|
||||
#define LBUMP(x) softc->x++
|
||||
#define LBUMPD(x, y) do { softc->x.y++; DT(y); } while (0)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ip_fil_netbsd.c,v 1.23.2.1 2017/08/14 23:51:14 snj Exp $ */
|
||||
/* $NetBSD: ip_fil_netbsd.c,v 1.23.2.2 2019/10/04 11:28:49 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2012 by Darren Reed.
|
||||
|
@ -8,7 +8,7 @@
|
|||
#if !defined(lint)
|
||||
#if defined(__NetBSD__)
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.23.2.1 2017/08/14 23:51:14 snj Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.23.2.2 2019/10/04 11:28:49 martin Exp $");
|
||||
#else
|
||||
static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed";
|
||||
static const char rcsid[] = "@(#)Id: ip_fil_netbsd.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp";
|
||||
|
@ -1490,6 +1490,8 @@ ipf_fastroute6(struct mbuf *m0, struct mbuf **mpp, fr_info_t *fin,
|
|||
# else
|
||||
error = nd6_output(ifp, ifp, m0, dst6, rt);
|
||||
# endif
|
||||
if (error)
|
||||
*mpp = NULL; /* m0 has been freed */
|
||||
} else {
|
||||
error = EMSGSIZE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue