Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/netipsec Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/5e67553373a5
branches: netbsd-8
changeset: 852727:5e67553373a5
user: martin <martin%NetBSD.org@localhost>
date: Fri Jan 31 11:01:38 2020 +0000
description:
Pull up following revision(s) (requested by knakahara in ticket #1497):
sys/netipsec/ipsecif.c: revision 1.19
Fix IPv6 over IPv4 ipsecif(4) uses IPv4 SP wrongly. Pointed out by ohishi@IIJ.
XXX pullup-8, pullup-9
diffstat:
sys/netipsec/ipsecif.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r 3bbe3e7620f3 -r 5e67553373a5 sys/netipsec/ipsecif.c
--- a/sys/netipsec/ipsecif.c Fri Jan 31 10:57:28 2020 +0000
+++ b/sys/netipsec/ipsecif.c Fri Jan 31 11:01:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsecif.c,v 1.1.2.9 2019/09/24 18:27:09 martin Exp $ */
+/* $NetBSD: ipsecif.c,v 1.1.2.10 2020/01/31 11:01:38 martin Exp $ */
/*
* Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsecif.c,v 1.1.2.9 2019/09/24 18:27:09 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsecif.c,v 1.1.2.10 2020/01/31 11:01:38 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -382,7 +382,17 @@
KASSERT(var->iv_psrc->sa_family == AF_INET);
KASSERT(var->iv_pdst->sa_family == AF_INET);
- sp = IV_SP_OUT(var);
+ switch (family) {
+ case AF_INET:
+ sp = IV_SP_OUT(var);
+ break;
+ case AF_INET6:
+ sp = IV_SP_OUT6(var);
+ break;
+ default:
+ m_freem(m);
+ return EAFNOSUPPORT;
+ }
KASSERT(sp != NULL);
/*
* The SPs in ipsec_variant are prevented from freed by
Home |
Main Index |
Thread Index |
Old Index