Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6-1]: src/sys/netinet6 Pull up following revision(s) (requested b...
details: https://anonhg.NetBSD.org/src/rev/4a85ec3ad75e
branches: netbsd-6-1
changeset: 776317:4a85ec3ad75e
user: martin <martin%NetBSD.org@localhost>
date: Sun Apr 01 09:19:32 2018 +0000
description:
Pull up following revision(s) (requested by maxv in ticket #1540):
sys/netinet6/ip6_forward.c: revision 1.91 (via patch)
Fix two pretty bad mistakes. If ipsec6_check_policy fails m is not freed,
and a 'goto out' is missing after ipsec6_process_packet.
diffstat:
sys/netinet6/ip6_forward.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r 0e413de76967 -r 4a85ec3ad75e sys/netinet6/ip6_forward.c
--- a/sys/netinet6/ip6_forward.c Mon Mar 26 12:20:00 2018 +0000
+++ b/sys/netinet6/ip6_forward.c Sun Apr 01 09:19:32 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_forward.c,v 1.69.8.1 2018/03/13 16:43:04 snj Exp $ */
+/* $NetBSD: ip6_forward.c,v 1.69.8.2 2018/04/01 09:19:32 martin Exp $ */
/* $KAME: ip6_forward.c,v 1.109 2002/09/11 08:10:17 sakane Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_forward.c,v 1.69.8.1 2018/03/13 16:43:04 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_forward.c,v 1.69.8.2 2018/04/01 09:19:32 martin Exp $");
#include "opt_gateway.h"
#include "opt_ipsec.h"
@@ -361,9 +361,10 @@
* because we asked key management for an SA and
* it was delayed (e.g. kicked up to IKE).
*/
- if (error == -EINVAL)
- error = 0;
- goto freecopy;
+ if (error == -EINVAL)
+ error = 0;
+ m_freem(m);
+ goto freecopy;
}
#endif /* FAST_IPSEC */
@@ -467,8 +468,10 @@
s = splsoftnet();
error = ipsec6_process_packet(m,sp->req);
splx(s);
+ /* m is freed */
if (mcopy)
goto freecopy;
+ return;
}
#endif
Home |
Main Index |
Thread Index |
Old Index