Hi,

Remove unused parameter from ipsp_spd_inp().

ok?

bluhm

Index: netinet/ip_ipsp.h
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet/ip_ipsp.h,v
retrieving revision 1.223
diff -u -p -r1.223 ip_ipsp.h
--- netinet/ip_ipsp.h   26 Nov 2021 16:16:35 -0000      1.223
+++ netinet/ip_ipsp.h   29 Nov 2021 21:41:44 -0000
@@ -634,8 +634,6 @@ int ipsp_process_packet(struct mbuf *, s
 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 *);
Index: netinet/ip_spd.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet/ip_spd.c,v
retrieving revision 1.105
diff -u -p -r1.105 ip_spd.c
--- netinet/ip_spd.c    25 Nov 2021 13:46:02 -0000      1.105
+++ netinet/ip_spd.c    29 Nov 2021 21:41:44 -0000
@@ -41,6 +41,8 @@
 #include <netinet/ip_ipsp.h>
 #include <net/pfkeyv2.h>
 
+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, 
                 * 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, 
 
                        /* 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, 
                                    &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, 
                        /* 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, 
                        /* 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, 
                        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, 
                        /* 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, 
                        /* 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
  * 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)

Reply via email to