diff options
-rw-r--r-- | net/ipv4/ipvs/ip_vs_sync.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c index 2d4a86f73325..8c900dfe832d 100644 --- a/net/ipv4/ipvs/ip_vs_sync.c +++ b/net/ipv4/ipvs/ip_vs_sync.c | |||
@@ -139,7 +139,11 @@ char ip_vs_master_mcast_ifn[IP_VS_IFNAME_MAXLEN]; | |||
139 | char ip_vs_backup_mcast_ifn[IP_VS_IFNAME_MAXLEN]; | 139 | char ip_vs_backup_mcast_ifn[IP_VS_IFNAME_MAXLEN]; |
140 | 140 | ||
141 | /* multicast addr */ | 141 | /* multicast addr */ |
142 | static struct sockaddr_in mcast_addr; | 142 | static struct sockaddr_in mcast_addr = { |
143 | .sin_family = AF_INET, | ||
144 | .sin_port = __constant_htons(IP_VS_SYNC_PORT), | ||
145 | .sin_addr.s_addr = __constant_htonl(IP_VS_SYNC_GROUP), | ||
146 | }; | ||
143 | 147 | ||
144 | 148 | ||
145 | static inline void sb_queue_tail(struct ip_vs_sync_buff *sb) | 149 | static inline void sb_queue_tail(struct ip_vs_sync_buff *sb) |
@@ -862,11 +866,6 @@ static int sync_thread(void *startup) | |||
862 | /* set the maximum length of sync message */ | 866 | /* set the maximum length of sync message */ |
863 | set_sync_mesg_maxlen(state); | 867 | set_sync_mesg_maxlen(state); |
864 | 868 | ||
865 | /* set up multicast address */ | ||
866 | mcast_addr.sin_family = AF_INET; | ||
867 | mcast_addr.sin_port = htons(IP_VS_SYNC_PORT); | ||
868 | mcast_addr.sin_addr.s_addr = htonl(IP_VS_SYNC_GROUP); | ||
869 | |||
870 | add_wait_queue(&sync_wait, &wait); | 869 | add_wait_queue(&sync_wait, &wait); |
871 | 870 | ||
872 | set_sync_pid(state, task_pid_nr(current)); | 871 | set_sync_pid(state, task_pid_nr(current)); |