@@ -152,7 +152,7 @@ static void __ovs_ct_update_key_orig_tp(struct sw_flow_key *key,
152
152
const struct nf_conntrack_tuple * orig ,
153
153
u8 icmp_proto )
154
154
{
155
- key -> ct . orig_proto = orig -> dst .protonum ;
155
+ key -> ct_orig_proto = orig -> dst .protonum ;
156
156
if (orig -> dst .protonum == icmp_proto ) {
157
157
key -> ct .orig_tp .src = htons (orig -> dst .u .icmp .type );
158
158
key -> ct .orig_tp .dst = htons (orig -> dst .u .icmp .code );
@@ -166,8 +166,8 @@ static void __ovs_ct_update_key(struct sw_flow_key *key, u8 state,
166
166
const struct nf_conntrack_zone * zone ,
167
167
const struct nf_conn * ct )
168
168
{
169
- key -> ct . state = state ;
170
- key -> ct . zone = zone -> id ;
169
+ key -> ct_state = state ;
170
+ key -> ct_zone = zone -> id ;
171
171
key -> ct .mark = ovs_ct_get_mark (ct );
172
172
ovs_ct_get_labels (ct , & key -> ct .labels );
173
173
@@ -195,10 +195,10 @@ static void __ovs_ct_update_key(struct sw_flow_key *key, u8 state,
195
195
return ;
196
196
}
197
197
}
198
- /* Clear 'ct.orig_proto ' to mark the non-existence of conntrack
198
+ /* Clear 'ct_orig_proto ' to mark the non-existence of conntrack
199
199
* original direction key fields.
200
200
*/
201
- key -> ct . orig_proto = 0 ;
201
+ key -> ct_orig_proto = 0 ;
202
202
}
203
203
204
204
/* Update 'key' based on skb->_nfct. If 'post_ct' is true, then OVS has
@@ -228,7 +228,7 @@ static void ovs_ct_update_key(const struct sk_buff *skb,
228
228
if (ct -> master )
229
229
state |= OVS_CS_F_RELATED ;
230
230
if (keep_nat_flags ) {
231
- state |= key -> ct . state & OVS_CS_F_NAT_MASK ;
231
+ state |= key -> ct_state & OVS_CS_F_NAT_MASK ;
232
232
} else {
233
233
if (ct -> status & IPS_SRC_NAT )
234
234
state |= OVS_CS_F_SRC_NAT ;
@@ -259,11 +259,11 @@ void ovs_ct_fill_key(const struct sk_buff *skb, struct sw_flow_key *key)
259
259
int ovs_ct_put_key (const struct sw_flow_key * swkey ,
260
260
const struct sw_flow_key * output , struct sk_buff * skb )
261
261
{
262
- if (nla_put_u32 (skb , OVS_KEY_ATTR_CT_STATE , output -> ct . state ))
262
+ if (nla_put_u32 (skb , OVS_KEY_ATTR_CT_STATE , output -> ct_state ))
263
263
return - EMSGSIZE ;
264
264
265
265
if (IS_ENABLED (CONFIG_NF_CONNTRACK_ZONES ) &&
266
- nla_put_u16 (skb , OVS_KEY_ATTR_CT_ZONE , output -> ct . zone ))
266
+ nla_put_u16 (skb , OVS_KEY_ATTR_CT_ZONE , output -> ct_zone ))
267
267
return - EMSGSIZE ;
268
268
269
269
if (IS_ENABLED (CONFIG_NF_CONNTRACK_MARK ) &&
@@ -275,14 +275,14 @@ int ovs_ct_put_key(const struct sw_flow_key *swkey,
275
275
& output -> ct .labels ))
276
276
return - EMSGSIZE ;
277
277
278
- if (swkey -> ct . orig_proto ) {
278
+ if (swkey -> ct_orig_proto ) {
279
279
if (swkey -> eth .type == htons (ETH_P_IP )) {
280
280
struct ovs_key_ct_tuple_ipv4 orig = {
281
281
output -> ipv4 .ct_orig .src ,
282
282
output -> ipv4 .ct_orig .dst ,
283
283
output -> ct .orig_tp .src ,
284
284
output -> ct .orig_tp .dst ,
285
- output -> ct . orig_proto ,
285
+ output -> ct_orig_proto ,
286
286
};
287
287
if (nla_put (skb , OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV4 ,
288
288
sizeof (orig ), & orig ))
@@ -293,7 +293,7 @@ int ovs_ct_put_key(const struct sw_flow_key *swkey,
293
293
IN6_ADDR_INITIALIZER (output -> ipv6 .ct_orig .dst ),
294
294
output -> ct .orig_tp .src ,
295
295
output -> ct .orig_tp .dst ,
296
- output -> ct . orig_proto ,
296
+ output -> ct_orig_proto ,
297
297
};
298
298
if (nla_put (skb , OVS_KEY_ATTR_CT_ORIG_TUPLE_IPV6 ,
299
299
sizeof (orig ), & orig ))
@@ -612,11 +612,11 @@ static bool skb_nfct_cached(struct net *net,
612
612
* due to an upcall. If the connection was not confirmed, it is not
613
613
* cached and needs to be run through conntrack again.
614
614
*/
615
- if (!ct && key -> ct . state & OVS_CS_F_TRACKED &&
616
- !(key -> ct . state & OVS_CS_F_INVALID ) &&
617
- key -> ct . zone == info -> zone .id ) {
615
+ if (!ct && key -> ct_state & OVS_CS_F_TRACKED &&
616
+ !(key -> ct_state & OVS_CS_F_INVALID ) &&
617
+ key -> ct_zone == info -> zone .id ) {
618
618
ct = ovs_ct_find_existing (net , & info -> zone , info -> family , skb ,
619
- !!(key -> ct . state
619
+ !!(key -> ct_state
620
620
& OVS_CS_F_NAT_MASK ));
621
621
if (ct )
622
622
nf_ct_get (skb , & ctinfo );
@@ -740,7 +740,7 @@ static void ovs_nat_update_key(struct sw_flow_key *key,
740
740
if (maniptype == NF_NAT_MANIP_SRC ) {
741
741
__be16 src ;
742
742
743
- key -> ct . state |= OVS_CS_F_SRC_NAT ;
743
+ key -> ct_state |= OVS_CS_F_SRC_NAT ;
744
744
if (key -> eth .type == htons (ETH_P_IP ))
745
745
key -> ipv4 .addr .src = ip_hdr (skb )-> saddr ;
746
746
else if (key -> eth .type == htons (ETH_P_IPV6 ))
@@ -762,7 +762,7 @@ static void ovs_nat_update_key(struct sw_flow_key *key,
762
762
} else {
763
763
__be16 dst ;
764
764
765
- key -> ct . state |= OVS_CS_F_DST_NAT ;
765
+ key -> ct_state |= OVS_CS_F_DST_NAT ;
766
766
if (key -> eth .type == htons (ETH_P_IP ))
767
767
key -> ipv4 .addr .dst = ip_hdr (skb )-> daddr ;
768
768
else if (key -> eth .type == htons (ETH_P_IPV6 ))
@@ -886,7 +886,7 @@ static int __ovs_ct_lookup(struct net *net, struct sw_flow_key *key,
886
886
* NAT after the nf_conntrack_in() call. We can actually clear
887
887
* the whole state, as it will be re-initialized below.
888
888
*/
889
- key -> ct . state = 0 ;
889
+ key -> ct_state = 0 ;
890
890
891
891
/* Update the key, but keep the NAT flags. */
892
892
ovs_ct_update_key (skb , info , key , true, true);
@@ -902,9 +902,9 @@ static int __ovs_ct_lookup(struct net *net, struct sw_flow_key *key,
902
902
*
903
903
* NAT will be done only if the CT action has NAT, and only
904
904
* once per packet (per zone), as guarded by the NAT bits in
905
- * the key->ct.state .
905
+ * the key->ct_state .
906
906
*/
907
- if (info -> nat && !(key -> ct . state & OVS_CS_F_NAT_MASK ) &&
907
+ if (info -> nat && !(key -> ct_state & OVS_CS_F_NAT_MASK ) &&
908
908
(nf_ct_is_confirmed (ct ) || info -> commit ) &&
909
909
ovs_ct_nat (net , key , info , skb , ct , ctinfo ) != NF_ACCEPT ) {
910
910
return - EINVAL ;
0 commit comments