diff options
Diffstat (limited to 'net/ipv4/ipvs/ip_vs_conn.c')
| -rw-r--r-- | net/ipv4/ipvs/ip_vs_conn.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c index 87b83813cf2c..8832eb517d52 100644 --- a/net/ipv4/ipvs/ip_vs_conn.c +++ b/net/ipv4/ipvs/ip_vs_conn.c | |||
| @@ -115,9 +115,9 @@ static inline void ct_write_unlock_bh(unsigned key) | |||
| 115 | /* | 115 | /* |
| 116 | * Returns hash value for IPVS connection entry | 116 | * Returns hash value for IPVS connection entry |
| 117 | */ | 117 | */ |
| 118 | static unsigned int ip_vs_conn_hashkey(unsigned proto, __u32 addr, __u16 port) | 118 | static unsigned int ip_vs_conn_hashkey(unsigned proto, __be32 addr, __be16 port) |
| 119 | { | 119 | { |
| 120 | return jhash_3words(addr, port, proto, ip_vs_conn_rnd) | 120 | return jhash_3words((__force u32)addr, (__force u32)port, proto, ip_vs_conn_rnd) |
| 121 | & IP_VS_CONN_TAB_MASK; | 121 | & IP_VS_CONN_TAB_MASK; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| @@ -188,7 +188,7 @@ static inline int ip_vs_conn_unhash(struct ip_vs_conn *cp) | |||
| 188 | * d_addr, d_port: pkt dest address (load balancer) | 188 | * d_addr, d_port: pkt dest address (load balancer) |
| 189 | */ | 189 | */ |
| 190 | static inline struct ip_vs_conn *__ip_vs_conn_in_get | 190 | static inline struct ip_vs_conn *__ip_vs_conn_in_get |
| 191 | (int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port) | 191 | (int protocol, __be32 s_addr, __be16 s_port, __be32 d_addr, __be16 d_port) |
| 192 | { | 192 | { |
| 193 | unsigned hash; | 193 | unsigned hash; |
| 194 | struct ip_vs_conn *cp; | 194 | struct ip_vs_conn *cp; |
| @@ -215,7 +215,7 @@ static inline struct ip_vs_conn *__ip_vs_conn_in_get | |||
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | struct ip_vs_conn *ip_vs_conn_in_get | 217 | struct ip_vs_conn *ip_vs_conn_in_get |
| 218 | (int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port) | 218 | (int protocol, __be32 s_addr, __be16 s_port, __be32 d_addr, __be16 d_port) |
| 219 | { | 219 | { |
| 220 | struct ip_vs_conn *cp; | 220 | struct ip_vs_conn *cp; |
| 221 | 221 | ||
| @@ -234,7 +234,7 @@ struct ip_vs_conn *ip_vs_conn_in_get | |||
| 234 | 234 | ||
| 235 | /* Get reference to connection template */ | 235 | /* Get reference to connection template */ |
| 236 | struct ip_vs_conn *ip_vs_ct_in_get | 236 | struct ip_vs_conn *ip_vs_ct_in_get |
| 237 | (int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port) | 237 | (int protocol, __be32 s_addr, __be16 s_port, __be32 d_addr, __be16 d_port) |
| 238 | { | 238 | { |
| 239 | unsigned hash; | 239 | unsigned hash; |
| 240 | struct ip_vs_conn *cp; | 240 | struct ip_vs_conn *cp; |
| @@ -274,7 +274,7 @@ struct ip_vs_conn *ip_vs_ct_in_get | |||
| 274 | * d_addr, d_port: pkt dest address (foreign host) | 274 | * d_addr, d_port: pkt dest address (foreign host) |
| 275 | */ | 275 | */ |
| 276 | struct ip_vs_conn *ip_vs_conn_out_get | 276 | struct ip_vs_conn *ip_vs_conn_out_get |
| 277 | (int protocol, __u32 s_addr, __u16 s_port, __u32 d_addr, __u16 d_port) | 277 | (int protocol, __be32 s_addr, __be16 s_port, __be32 d_addr, __be16 d_port) |
| 278 | { | 278 | { |
| 279 | unsigned hash; | 279 | unsigned hash; |
| 280 | struct ip_vs_conn *cp, *ret=NULL; | 280 | struct ip_vs_conn *cp, *ret=NULL; |
| @@ -324,7 +324,7 @@ void ip_vs_conn_put(struct ip_vs_conn *cp) | |||
| 324 | /* | 324 | /* |
| 325 | * Fill a no_client_port connection with a client port number | 325 | * Fill a no_client_port connection with a client port number |
| 326 | */ | 326 | */ |
| 327 | void ip_vs_conn_fill_cport(struct ip_vs_conn *cp, __u16 cport) | 327 | void ip_vs_conn_fill_cport(struct ip_vs_conn *cp, __be16 cport) |
| 328 | { | 328 | { |
| 329 | if (ip_vs_conn_unhash(cp)) { | 329 | if (ip_vs_conn_unhash(cp)) { |
| 330 | spin_lock(&cp->lock); | 330 | spin_lock(&cp->lock); |
| @@ -508,10 +508,10 @@ int ip_vs_check_template(struct ip_vs_conn *ct) | |||
| 508 | /* | 508 | /* |
| 509 | * Invalidate the connection template | 509 | * Invalidate the connection template |
| 510 | */ | 510 | */ |
| 511 | if (ct->vport != 65535) { | 511 | if (ct->vport != htons(0xffff)) { |
| 512 | if (ip_vs_conn_unhash(ct)) { | 512 | if (ip_vs_conn_unhash(ct)) { |
| 513 | ct->dport = 65535; | 513 | ct->dport = htons(0xffff); |
| 514 | ct->vport = 65535; | 514 | ct->vport = htons(0xffff); |
| 515 | ct->cport = 0; | 515 | ct->cport = 0; |
| 516 | ip_vs_conn_hash(ct); | 516 | ip_vs_conn_hash(ct); |
| 517 | } | 517 | } |
| @@ -596,8 +596,8 @@ void ip_vs_conn_expire_now(struct ip_vs_conn *cp) | |||
| 596 | * Create a new connection entry and hash it into the ip_vs_conn_tab | 596 | * Create a new connection entry and hash it into the ip_vs_conn_tab |
| 597 | */ | 597 | */ |
| 598 | struct ip_vs_conn * | 598 | struct ip_vs_conn * |
| 599 | ip_vs_conn_new(int proto, __u32 caddr, __u16 cport, __u32 vaddr, __u16 vport, | 599 | ip_vs_conn_new(int proto, __be32 caddr, __be16 cport, __be32 vaddr, __be16 vport, |
| 600 | __u32 daddr, __u16 dport, unsigned flags, | 600 | __be32 daddr, __be16 dport, unsigned flags, |
| 601 | struct ip_vs_dest *dest) | 601 | struct ip_vs_dest *dest) |
| 602 | { | 602 | { |
| 603 | struct ip_vs_conn *cp; | 603 | struct ip_vs_conn *cp; |
