]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
xfrm: rename reqid in xfrm_migrate
authorAntony Antony <antony.antony@secunet.com>
Tue, 26 May 2026 19:07:15 +0000 (21:07 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 4 Jun 2026 10:22:38 +0000 (12:22 +0200)
In preparation for a later patch in this series s/reqid/old_reqid/.
No functional change.

Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/xfrm.h
net/key/af_key.c
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_state.c
net/xfrm/xfrm_user.c

index 0c035955d87da289846fd3a9ad59ec4c8599eec9..368b1dc22e5cc376cbe96a7f6fb8cddc2e1cec87 100644 (file)
@@ -685,7 +685,7 @@ struct xfrm_migrate {
        u8                      proto;
        u8                      mode;
        u16                     reserved;
-       u32                     reqid;
+       u32                     old_reqid;
        u16                     old_family;
        u16                     new_family;
 };
index 842bf5786e3f151bc5c837d115de870589ca2e87..1f0201d97b4f60f4261eeb7b1dbb342b2573d196 100644 (file)
@@ -2554,7 +2554,7 @@ static int ipsecrequests_to_migrate(struct sadb_x_ipsecrequest *rq1, int len,
        if ((mode = pfkey_mode_to_xfrm(rq1->sadb_x_ipsecrequest_mode)) < 0)
                return -EINVAL;
        m->mode = mode;
-       m->reqid = rq1->sadb_x_ipsecrequest_reqid;
+       m->old_reqid = rq1->sadb_x_ipsecrequest_reqid;
 
        return ((int)(rq1->sadb_x_ipsecrequest_len +
                      rq2->sadb_x_ipsecrequest_len));
@@ -3655,15 +3655,15 @@ static int pfkey_send_migrate(const struct xfrm_selector *sel, u8 dir, u8 type,
                if (mode < 0)
                        goto err;
                if (set_ipsecrequest(skb, mp->proto, mode,
-                                    (mp->reqid ?  IPSEC_LEVEL_UNIQUE : IPSEC_LEVEL_REQUIRE),
-                                    mp->reqid, mp->old_family,
+                                    (mp->old_reqid ? IPSEC_LEVEL_UNIQUE : IPSEC_LEVEL_REQUIRE),
+                                    mp->old_reqid, mp->old_family,
                                     &mp->old_saddr, &mp->old_daddr) < 0)
                        goto err;
 
                /* new ipsecrequest */
                if (set_ipsecrequest(skb, mp->proto, mode,
-                                    (mp->reqid ? IPSEC_LEVEL_UNIQUE : IPSEC_LEVEL_REQUIRE),
-                                    mp->reqid, mp->new_family,
+                                    (mp->old_reqid ? IPSEC_LEVEL_UNIQUE : IPSEC_LEVEL_REQUIRE),
+                                    mp->old_reqid, mp->new_family,
                                     &mp->new_saddr, &mp->new_daddr) < 0)
                        goto err;
        }
index c944327ce66c0d82c8f3b7269d150f54af0c0f85..fd505adf080e60171adebbe32dd8e99827683763 100644 (file)
@@ -4538,7 +4538,7 @@ static int migrate_tmpl_match(const struct xfrm_migrate *m, const struct xfrm_tm
        int match = 0;
 
        if (t->mode == m->mode && t->id.proto == m->proto &&
-           (m->reqid == 0 || t->reqid == m->reqid)) {
+           (m->old_reqid == 0 || t->reqid == m->old_reqid)) {
                switch (t->mode) {
                case XFRM_MODE_TUNNEL:
                case XFRM_MODE_BEET:
@@ -4632,7 +4632,7 @@ static int xfrm_migrate_check(const struct xfrm_migrate *m, int num_migrate,
                                    sizeof(m[i].old_saddr)) &&
                            m[i].proto == m[j].proto &&
                            m[i].mode == m[j].mode &&
-                           m[i].reqid == m[j].reqid &&
+                           m[i].old_reqid == m[j].old_reqid &&
                            m[i].old_family == m[j].old_family) {
                                NL_SET_ERR_MSG(extack, "Entries in the MIGRATE attribute's list must be unique");
                                return -EINVAL;
index b9de931d84c1de8ad4d4ed2983ac948b430bab7b..5424f2becbafbc6ed4a5e4fa2a2ab5ed9e3b404d 100644 (file)
@@ -2081,14 +2081,14 @@ struct xfrm_state *xfrm_migrate_state_find(struct xfrm_migrate *m, struct net *n
 
        spin_lock_bh(&net->xfrm.xfrm_state_lock);
 
-       if (m->reqid) {
+       if (m->old_reqid) {
                h = xfrm_dst_hash(net, &m->old_daddr, &m->old_saddr,
-                                 m->reqid, m->old_family);
+                                 m->old_reqid, m->old_family);
                hlist_for_each_entry(x, xfrm_state_deref_prot(net->xfrm.state_bydst, net) + h, bydst) {
                        if (x->props.mode != m->mode ||
                            x->id.proto != m->proto)
                                continue;
-                       if (m->reqid && x->props.reqid != m->reqid)
+                       if (m->old_reqid && x->props.reqid != m->old_reqid)
                                continue;
                        if (if_id != 0 && x->if_id != if_id)
                                continue;
index e87f33aaa99c01ebee70c1130c89eb82f0bcf47c..ce65e872cbacad9a77bb686885125ef70c6c484a 100644 (file)
@@ -3110,7 +3110,7 @@ static int copy_from_user_migrate(struct xfrm_migrate *ma,
 
                ma->proto = um->proto;
                ma->mode = um->mode;
-               ma->reqid = um->reqid;
+               ma->old_reqid = um->reqid;
 
                ma->old_family = um->old_family;
                ma->new_family = um->new_family;
@@ -3193,7 +3193,7 @@ static int copy_to_user_migrate(const struct xfrm_migrate *m, struct sk_buff *sk
        memset(&um, 0, sizeof(um));
        um.proto = m->proto;
        um.mode = m->mode;
-       um.reqid = m->reqid;
+       um.reqid = m->old_reqid;
        um.old_family = m->old_family;
        memcpy(&um.old_daddr, &m->old_daddr, sizeof(um.old_daddr));
        memcpy(&um.old_saddr, &m->old_saddr, sizeof(um.old_saddr));