diff options
Diffstat (limited to 'net/ipv4/cipso_ipv4.c')
-rw-r--r-- | net/ipv4/cipso_ipv4.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c index 6460233407c7..c3a61ebbadef 100644 --- a/net/ipv4/cipso_ipv4.c +++ b/net/ipv4/cipso_ipv4.c | |||
@@ -966,7 +966,7 @@ static int cipso_v4_gentag_hdr(const struct cipso_v4_doi *doi_def, | |||
966 | 966 | ||
967 | buf[0] = IPOPT_CIPSO; | 967 | buf[0] = IPOPT_CIPSO; |
968 | buf[1] = CIPSO_V4_HDR_LEN + len; | 968 | buf[1] = CIPSO_V4_HDR_LEN + len; |
969 | *(u32 *)&buf[2] = htonl(doi_def->doi); | 969 | *(__be32 *)&buf[2] = htonl(doi_def->doi); |
970 | 970 | ||
971 | return 0; | 971 | return 0; |
972 | } | 972 | } |
@@ -1140,7 +1140,7 @@ int cipso_v4_validate(unsigned char **option) | |||
1140 | } | 1140 | } |
1141 | 1141 | ||
1142 | rcu_read_lock(); | 1142 | rcu_read_lock(); |
1143 | doi_def = cipso_v4_doi_getdef(ntohl(*((u32 *)&opt[2]))); | 1143 | doi_def = cipso_v4_doi_getdef(ntohl(*((__be32 *)&opt[2]))); |
1144 | if (doi_def == NULL) { | 1144 | if (doi_def == NULL) { |
1145 | err_offset = 2; | 1145 | err_offset = 2; |
1146 | goto validate_return_locked; | 1146 | goto validate_return_locked; |
@@ -1370,7 +1370,7 @@ int cipso_v4_sock_getattr(struct sock *sk, struct netlbl_lsm_secattr *secattr) | |||
1370 | if (ret_val == 0) | 1370 | if (ret_val == 0) |
1371 | return ret_val; | 1371 | return ret_val; |
1372 | 1372 | ||
1373 | doi = ntohl(*(u32 *)&cipso_ptr[2]); | 1373 | doi = ntohl(*(__be32 *)&cipso_ptr[2]); |
1374 | rcu_read_lock(); | 1374 | rcu_read_lock(); |
1375 | doi_def = cipso_v4_doi_getdef(doi); | 1375 | doi_def = cipso_v4_doi_getdef(doi); |
1376 | if (doi_def == NULL) { | 1376 | if (doi_def == NULL) { |
@@ -1436,7 +1436,7 @@ int cipso_v4_skbuff_getattr(const struct sk_buff *skb, | |||
1436 | if (cipso_v4_cache_check(cipso_ptr, cipso_ptr[1], secattr) == 0) | 1436 | if (cipso_v4_cache_check(cipso_ptr, cipso_ptr[1], secattr) == 0) |
1437 | return 0; | 1437 | return 0; |
1438 | 1438 | ||
1439 | doi = ntohl(*(u32 *)&cipso_ptr[2]); | 1439 | doi = ntohl(*(__be32 *)&cipso_ptr[2]); |
1440 | rcu_read_lock(); | 1440 | rcu_read_lock(); |
1441 | doi_def = cipso_v4_doi_getdef(doi); | 1441 | doi_def = cipso_v4_doi_getdef(doi); |
1442 | if (doi_def == NULL) | 1442 | if (doi_def == NULL) |