From 718537bb274749dfc56e83a8a255b7cdb6ff8ffd Mon Sep 17 00:00:00 2001 From: bluhm Date: Tue, 30 Nov 2021 13:17:43 +0000 Subject: [PATCH] Remove unused parameter from ipsp_spd_inp(). OK mvs@ yasuoka@ --- sys/netinet/ip_ipsp.h | 4 +--- sys/netinet/ip_spd.c | 35 ++++++++++++++--------------------- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/sys/netinet/ip_ipsp.h b/sys/netinet/ip_ipsp.h index b0559ff2acf..23edd0796ae 100644 --- a/sys/netinet/ip_ipsp.h +++ b/sys/netinet/ip_ipsp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipsp.h,v 1.223 2021/11/26 16:16:35 tobhe Exp $ */ +/* $OpenBSD: ip_ipsp.h,v 1.224 2021/11/30 13:17:43 bluhm Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr), @@ -634,8 +634,6 @@ int ipsp_process_packet(struct mbuf *, struct tdb *, int, int); int ipsp_process_done(struct mbuf *, struct tdb *); struct tdb *ipsp_spd_lookup(struct mbuf *, int, int, int *, int, struct tdb *, struct inpcb *, u_int32_t); -struct tdb *ipsp_spd_inp(struct mbuf *, int, int, int *, int, - struct tdb *, struct inpcb *, struct ipsec_policy *); int ipsp_is_unspecified(union sockaddr_union); int ipsp_aux_match(struct tdb *, struct ipsec_ids *, struct sockaddr_encap *, struct sockaddr_encap *); diff --git a/sys/netinet/ip_spd.c b/sys/netinet/ip_spd.c index a213f0ebe57..6a80b8dd2ed 100644 --- a/sys/netinet/ip_spd.c +++ b/sys/netinet/ip_spd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_spd.c,v 1.105 2021/11/25 13:46:02 bluhm Exp $ */ +/* $OpenBSD: ip_spd.c,v 1.106 2021/11/30 13:17:43 bluhm Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) * @@ -41,6 +41,8 @@ #include #include +struct tdb *ipsp_spd_inp(struct mbuf *, int *, struct inpcb *, + struct ipsec_policy *); int ipsp_acquire_sa(struct ipsec_policy *, union sockaddr_union *, union sockaddr_union *, struct sockaddr_encap *, struct mbuf *); struct ipsec_acquire *ipsp_pending_acquire(struct ipsec_policy *, @@ -307,16 +309,14 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int *error, int direction, * system-wide policies. */ *error = 0; - return ipsp_spd_inp(m, af, hlen, error, direction, - tdbp, inp, NULL); + return ipsp_spd_inp(m, error, inp, NULL); } ipo = (struct ipsec_policy *)rn; switch (ipo->ipo_type) { case IPSP_PERMIT: *error = 0; - return ipsp_spd_inp(m, af, hlen, error, direction, tdbp, - inp, ipo); + return ipsp_spd_inp(m, error, inp, ipo); case IPSP_DENY: *error = EHOSTUNREACH; @@ -415,8 +415,7 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int *error, int direction, /* Cached entry is good. */ *error = 0; - return ipsp_spd_inp(m, af, hlen, error, direction, - tdbp, inp, ipo); + return ipsp_spd_inp(m, error, inp, ipo); nomatchout: /* Cached TDB was not good. */ @@ -452,8 +451,7 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int *error, int direction, &ipo->ipo_tdb->tdb_policy_head, ipo, ipo_tdb_next); *error = 0; - return ipsp_spd_inp(m, af, hlen, error, - direction, tdbp, inp, ipo); + return ipsp_spd_inp(m, error, inp, ipo); } } @@ -481,8 +479,7 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int *error, int direction, /* FALLTHROUGH */ case IPSP_IPSEC_USE: *error = 0; - return ipsp_spd_inp(m, af, hlen, error, direction, - tdbp, inp, ipo); + return ipsp_spd_inp(m, error, inp, ipo); } } else { /* IPSP_DIRECTION_IN */ if (tdbp != NULL) { @@ -507,8 +504,7 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int *error, int direction, /* Direct match in the cache. */ if (ipo->ipo_tdb == tdbp) { *error = 0; - return ipsp_spd_inp(m, af, hlen, error, - direction, tdbp, inp, ipo); + return ipsp_spd_inp(m, error, inp, ipo); } if (memcmp(dignore ? &ssrc : &ipo->ipo_dst, @@ -532,8 +528,7 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int *error, int direction, TAILQ_INSERT_TAIL(&tdbp->tdb_policy_head, ipo, ipo_tdb_next); *error = 0; - return ipsp_spd_inp(m, af, hlen, error, direction, - tdbp, inp, ipo); + return ipsp_spd_inp(m, error, inp, ipo); nomatchin: /* Nothing needed here, falling through */ ; @@ -603,8 +598,7 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int *error, int direction, /* If appropriate SA exists, don't acquire another. */ if (ipo->ipo_tdb) { *error = 0; - return ipsp_spd_inp(m, af, hlen, error, - direction, tdbp, inp, ipo); + return ipsp_spd_inp(m, error, inp, ipo); } /* Acquire SA through key management. */ @@ -614,8 +608,7 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int *error, int direction, /* FALLTHROUGH */ case IPSP_IPSEC_USE: *error = 0; - return ipsp_spd_inp(m, af, hlen, error, direction, - tdbp, inp, ipo); + return ipsp_spd_inp(m, error, inp, ipo); } } @@ -832,8 +825,8 @@ ipsp_acquire_sa(struct ipsec_policy *ipo, union sockaddr_union *gw, * Deal with PCB security requirements. */ struct tdb * -ipsp_spd_inp(struct mbuf *m, int af, int hlen, int *error, int direction, - struct tdb *tdbp, struct inpcb *inp, struct ipsec_policy *ipo) +ipsp_spd_inp(struct mbuf *m, int *error, struct inpcb *inp, + struct ipsec_policy *ipo) { /* Sanity check. */ if (inp == NULL) -- 2.20.1