OK to remove unused arguments?

---
 sys/netinet/ip_ipsp.c |  7 +++----
 sys/netinet/ip_ipsp.h |  7 +++----
 sys/netinet/ip_spd.c  | 13 ++++++-------
 3 files changed, 12 insertions(+), 15 deletions(-)

diff --git sys/netinet/ip_ipsp.c sys/netinet/ip_ipsp.c
index c6864e8..f6e598f 100644
--- sys/netinet/ip_ipsp.c
+++ sys/netinet/ip_ipsp.c
@@ -395,22 +395,22 @@ ipsp_aux_match(struct tdb *tdb,
        return 1;
 }
 
 /*
  * Get an SA given the remote address, the security protocol type, and
  * the desired IDs.
  */
 struct tdb *
 gettdbbyaddr(u_int rdomain, union sockaddr_union *dst, u_int8_t sproto,
     struct ipsec_ref *srcid, struct ipsec_ref *dstid,
-    struct ipsec_ref *local_cred, struct mbuf *m, int af,
-    struct sockaddr_encap *filter, struct sockaddr_encap *filtermask)
+    struct ipsec_ref *local_cred, struct sockaddr_encap *filter,
+    struct sockaddr_encap *filtermask)
 {
        u_int32_t hashval;
        struct tdb *tdbp;
 
        if (tdbaddr == NULL)
                return (struct tdb *) NULL;
 
        hashval = tdb_hash(rdomain, 0, dst, sproto);
 
        for (tdbp = tdbaddr[hashval]; tdbp != NULL; tdbp = tdbp->tdb_anext)
@@ -428,22 +428,21 @@ gettdbbyaddr(u_int rdomain, union sockaddr_union *dst, 
u_int8_t sproto,
        return tdbp;
 }
 
 /*
  * Get an SA given the source address, the security protocol type, and
  * the desired IDs.
  */
 struct tdb *
 gettdbbysrc(u_int rdomain, union sockaddr_union *src, u_int8_t sproto,
     struct ipsec_ref *srcid, struct ipsec_ref *dstid,
-    struct mbuf *m, int af, struct sockaddr_encap *filter,
-    struct sockaddr_encap *filtermask)
+    struct sockaddr_encap *filter, struct sockaddr_encap *filtermask)
 {
        u_int32_t hashval;
        struct tdb *tdbp;
 
        if (tdbsrc == NULL)
                return (struct tdb *) NULL;
 
        hashval = tdb_hash(rdomain, 0, src, sproto);
 
        for (tdbp = tdbsrc[hashval]; tdbp != NULL; tdbp = tdbp->tdb_snext)
diff --git sys/netinet/ip_ipsp.h sys/netinet/ip_ipsp.h
index c7e2e1e..8c24fc1 100644
--- sys/netinet/ip_ipsp.h
+++ sys/netinet/ip_ipsp.h
@@ -497,26 +497,25 @@ do {                                                      
                \
 uint8_t        get_sa_require(struct inpcb *);
 #ifdef ENCDEBUG
 const char *ipsp_address(union sockaddr_union, char *, socklen_t);
 #endif /* ENCDEBUG */
 
 /* TDB management routines */
 void   tdb_add_inp(struct tdb *, struct inpcb *, int);
 uint32_t reserve_spi(u_int, u_int32_t, u_int32_t, union sockaddr_union *,
                union sockaddr_union *, u_int8_t, int *);
 struct tdb *gettdb(u_int, u_int32_t, union sockaddr_union *, u_int8_t);
-struct tdb *gettdbbyaddr(u_int, union sockaddr_union *, u_int8_t, 
+struct tdb *gettdbbyaddr(u_int, union sockaddr_union *, u_int8_t,
                struct ipsec_ref *, struct ipsec_ref *, struct ipsec_ref *,
-               struct mbuf *, int, struct sockaddr_encap *,
-               struct sockaddr_encap *);
+               struct sockaddr_encap *, struct sockaddr_encap *);
 struct tdb *gettdbbysrc(u_int, union sockaddr_union *, u_int8_t,
-               struct ipsec_ref *, struct ipsec_ref *, struct mbuf *, int,
+               struct ipsec_ref *, struct ipsec_ref *,
                struct sockaddr_encap *, struct sockaddr_encap *);
 struct tdb *gettdbbysrcdst(u_int, u_int32_t, union sockaddr_union *,
                union sockaddr_union *, u_int8_t);
 void   puttdb(struct tdb *);
 void   tdb_delete(struct tdb *);
 struct tdb *tdb_alloc(u_int);
 void   tdb_free(struct tdb *);
 int    tdb_init(struct tdb *, u_int16_t, struct ipsecinit *);
 int    tdb_walk(u_int, int (*)(struct tdb *, void *, int), void *);
 
diff --git sys/netinet/ip_spd.c sys/netinet/ip_spd.c
index 68a08c5..3287e2f 100644
--- sys/netinet/ip_spd.c
+++ sys/netinet/ip_spd.c
@@ -398,22 +398,22 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int 
*error, int direction,
                        if (dignore == 0)
                                ipo->ipo_last_searched = time_second;
 
                        /* Find an appropriate SA from the existing ones. */
                        ipo->ipo_tdb =
                            gettdbbyaddr(rdomain,
                                dignore ? &sdst : &ipo->ipo_dst,
                                ipo->ipo_sproto,
                                srcid ? srcid : ipo->ipo_srcid,
                                dstid ? dstid : ipo->ipo_dstid,
-                               ipo->ipo_local_cred, m, af,
-                               &ipo->ipo_addr, &ipo->ipo_mask);
+                               ipo->ipo_local_cred, &ipo->ipo_addr,
+                               &ipo->ipo_mask);
                        if (ipo->ipo_tdb) {
                                
TAILQ_INSERT_TAIL(&ipo->ipo_tdb->tdb_policy_head,
                                    ipo, ipo_tdb_next);
                                *error = 0;
                                return ipsp_spd_inp(m, af, hlen, error,
                                    direction, tdbp, inp, ipo);
                        }
                }
 
                /* So, we don't have an SA -- just a policy. */
@@ -512,21 +512,21 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int 
*error, int direction,
 
                /* Find whether there exists an appropriate SA. */
                if (ipo->ipo_last_searched <= ipsec_last_added) {
                        if (dignore == 0)
                                ipo->ipo_last_searched = time_second;
 
                        ipo->ipo_tdb =
                            gettdbbysrc(rdomain,
                                dignore ? &ssrc : &ipo->ipo_dst,
                                ipo->ipo_sproto, ipo->ipo_srcid,
-                               ipo->ipo_dstid, m, af, &ipo->ipo_addr,
+                               ipo->ipo_dstid, &ipo->ipo_addr,
                                &ipo->ipo_mask);
                        if (ipo->ipo_tdb)
                                
TAILQ_INSERT_TAIL(&ipo->ipo_tdb->tdb_policy_head,
                                    ipo, ipo_tdb_next);
                }
   skipinputsearch:
 
                switch (ipo->ipo_type) {
                case IPSP_IPSEC_REQUIRE:
                        /* If appropriate SA exists, don't acquire another. */
@@ -1003,21 +1003,21 @@ ipsp_spd_inp(struct mbuf *m, int af, int hlen, int 
*error, int direction,
                         */
                        if (inp->inp_ipo->ipo_last_searched <=
                            ipsec_last_added) {
                                inp->inp_ipo->ipo_last_searched = time_second;
 
                                /* Do we have an SA already established ? */
                                if (gettdbbysrc(rtable_l2(inp->inp_rtableid),
                                    &inp->inp_ipo->ipo_dst,
                                    inp->inp_ipo->ipo_sproto,
                                    inp->inp_ipo->ipo_srcid,
-                                   inp->inp_ipo->ipo_dstid, m, af,
+                                   inp->inp_ipo->ipo_dstid,
                                    &inp->inp_ipo->ipo_addr,
                                    &inp->inp_ipo->ipo_mask) != NULL) {
                                        *error = -EINVAL;
                                        return NULL;
                                }
                                /* Fall through */
                        }
 
                        /*
                         * If we don't have an appropriate SA, acquire one
@@ -1061,36 +1061,35 @@ ipsp_spd_inp(struct mbuf *m, int af, int hlen, int 
*error, int direction,
 
                                /* Update, just in case. */
                                ipsec_update_policy(inp, inp->inp_ipo, af,
                                    IPSP_DIRECTION_OUT);
 
                                tdb = gettdbbyaddr(rtable_l2(inp->inp_rtableid),
                                    &inp->inp_ipo->ipo_dst,
                                    inp->inp_ipo->ipo_sproto,
                                    inp->inp_ipo->ipo_srcid,
                                    inp->inp_ipo->ipo_dstid,
-                                   inp->inp_ipo->ipo_local_cred, m, af,
+                                   inp->inp_ipo->ipo_local_cred,
                                    &inp->inp_ipo->ipo_addr,
                                    &inp->inp_ipo->ipo_mask);
                        }
                } else {
                        /*
                         * Construct a pseudo-policy, with just the necessary
                         * fields.
                         */
                        ipsec_update_policy(inp, &sipon, af,
                            IPSP_DIRECTION_OUT);
 
                        tdb = gettdbbyaddr(rtable_l2(inp->inp_rtableid),
                            &sipon.ipo_dst, IPPROTO_ESP, NULL,
-                           NULL, NULL, m, af, &sipon.ipo_addr,
-                           &sipon.ipo_mask);
+                           NULL, NULL, &sipon.ipo_addr, &sipon.ipo_mask);
                }
 
                /* If we found an appropriate SA... */
                if (tdb != NULL) {
                        tdb_add_inp(tdb, inp, 0); /* Latch onto PCB. */
 
                        if (ipo != NULL && ipo->ipo_tdb != NULL &&
                            ipo->ipo_tdb != inp->inp_tdb_out && m != NULL)
                                goto tagandreturn;
                        else
-- 
2.3.4

Reply via email to