aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/ipvs/ip_vs_ftp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/ipvs/ip_vs_ftp.c b/net/ipv4/ipvs/ip_vs_ftp.c
index b3bbb4a07ae0..e433cb0ff894 100644
--- a/net/ipv4/ipvs/ip_vs_ftp.c
+++ b/net/ipv4/ipvs/ip_vs_ftp.c
@@ -32,6 +32,7 @@
32#include <linux/ip.h> 32#include <linux/ip.h>
33#include <net/protocol.h> 33#include <net/protocol.h>
34#include <net/tcp.h> 34#include <net/tcp.h>
35#include <asm/unaligned.h>
35 36
36#include <net/ip_vs.h> 37#include <net/ip_vs.h>
37 38
@@ -114,8 +115,8 @@ static int ip_vs_ftp_get_addrport(char *data, char *data_limit,
114 if (i != 5) 115 if (i != 5)
115 return -1; 116 return -1;
116 117
117 *addr = (p[3]<<24) | (p[2]<<16) | (p[1]<<8) | p[0]; 118 *addr = get_unaligned((__be32 *)p);
118 *port = (p[5]<<8) | p[4]; 119 *port = get_unaligned((__be16 *)(p + 4));
119 return 1; 120 return 1;
120} 121}
121 122