Remove unused and misleading argument from ipsec_set_policy. trunk
authormaxv <maxv@NetBSD.org>
Sun, 29 Apr 2018 11:51:08 +0000
branchtrunk
changeset 318561 a314687515a7
parent 318560 ae1ec9a5b006
child 318562 31eb6d401147
Remove unused and misleading argument from ipsec_set_policy.
sys/netinet/ip_output.c
sys/netinet6/ip6_output.c
sys/netipsec/ipsec.c
sys/netipsec/ipsec.h
--- a/sys/netinet/ip_output.c	Sun Apr 29 11:42:09 2018 +0000
+++ b/sys/netinet/ip_output.c	Sun Apr 29 11:51:08 2018 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_output.c,v 1.303 2018/04/21 13:22:06 maxv Exp $	*/
+/*	$NetBSD: ip_output.c,v 1.304 2018/04/29 11:51:08 maxv Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.303 2018/04/21 13:22:06 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.304 2018/04/29 11:51:08 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1262,7 +1262,7 @@
 #if defined(IPSEC)
 		case IP_IPSEC_POLICY:
 			if (ipsec_enabled) {
-				error = ipsec_set_policy(inp, sopt->sopt_name,
+				error = ipsec_set_policy(inp,
 				    sopt->sopt_data, sopt->sopt_size,
 				    curlwp->l_cred);
 				break;
--- a/sys/netinet6/ip6_output.c	Sun Apr 29 11:42:09 2018 +0000
+++ b/sys/netinet6/ip6_output.c	Sun Apr 29 11:51:08 2018 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip6_output.c,v 1.206 2018/04/26 19:50:09 maxv Exp $	*/
+/*	$NetBSD: ip6_output.c,v 1.207 2018/04/29 11:51:08 maxv Exp $	*/
 /*	$KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.206 2018/04/26 19:50:09 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.207 2018/04/29 11:51:08 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1749,7 +1749,7 @@
 #if defined(IPSEC)
 		case IPV6_IPSEC_POLICY:
 			if (ipsec_enabled) {
-				error = ipsec_set_policy(in6p, optname,
+				error = ipsec_set_policy(in6p,
 				    sopt->sopt_data, sopt->sopt_size,
 				    kauth_cred_get());
 				break;
--- a/sys/netipsec/ipsec.c	Sun Apr 29 11:42:09 2018 +0000
+++ b/sys/netipsec/ipsec.c	Sun Apr 29 11:51:08 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.c,v 1.160 2018/04/28 15:45:16 maxv Exp $ */
+/* $NetBSD: ipsec.c,v 1.161 2018/04/29 11:51:08 maxv Exp $ */
 /* $FreeBSD: ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $ */
 /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */
 
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.160 2018/04/28 15:45:16 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.161 2018/04/29 11:51:08 maxv Exp $");
 
 /*
  * IPsec controller part.
@@ -1151,7 +1151,7 @@
 }
 
 int
-ipsec_set_policy(void *inp, int optname, const void *request, size_t len,
+ipsec_set_policy(void *inp, const void *request, size_t len,
     kauth_cred_t cred)
 {
 	struct inpcb_hdr *inph = (struct inpcb_hdr *)inp;
--- a/sys/netipsec/ipsec.h	Sun Apr 29 11:42:09 2018 +0000
+++ b/sys/netipsec/ipsec.h	Sun Apr 29 11:51:08 2018 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec.h,v 1.78 2018/04/29 07:24:38 maxv Exp $	*/
+/*	$NetBSD: ipsec.h,v 1.79 2018/04/29 11:51:08 maxv Exp $	*/
 /*	$FreeBSD: ipsec.h,v 1.2.4.2 2004/02/14 22:23:23 bms Exp $	*/
 /*	$KAME: ipsec.h,v 1.53 2001/11/20 08:32:38 itojun Exp $	*/
 
@@ -270,7 +270,7 @@
 int ipsec_copy_policy(const struct inpcbpolicy *, struct inpcbpolicy *);
 u_int ipsec_get_reqlevel(const struct ipsecrequest *);
 
-int ipsec_set_policy(void *, int, const void *, size_t, kauth_cred_t);
+int ipsec_set_policy(void *, const void *, size_t, kauth_cred_t);
 int ipsec_get_policy(void *, const void *, size_t, struct mbuf **);
 int ipsec_delete_pcbpolicy(void *);
 int ipsec_in_reject(struct mbuf *, void *);