mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
ipvs: Initialize mcast addr at compile time
There's no need to do it at runtime, the values are constant. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Acked-by: Simon Horman <horms@verge.net.au>
This commit is contained in:
parent
0b57664cf2
commit
d56400504a
1 changed files with 5 additions and 6 deletions
|
@ -139,7 +139,11 @@ char ip_vs_master_mcast_ifn[IP_VS_IFNAME_MAXLEN];
|
||||||
char ip_vs_backup_mcast_ifn[IP_VS_IFNAME_MAXLEN];
|
char ip_vs_backup_mcast_ifn[IP_VS_IFNAME_MAXLEN];
|
||||||
|
|
||||||
/* multicast addr */
|
/* multicast addr */
|
||||||
static struct sockaddr_in mcast_addr;
|
static struct sockaddr_in mcast_addr = {
|
||||||
|
.sin_family = AF_INET,
|
||||||
|
.sin_port = __constant_htons(IP_VS_SYNC_PORT),
|
||||||
|
.sin_addr.s_addr = __constant_htonl(IP_VS_SYNC_GROUP),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static inline void sb_queue_tail(struct ip_vs_sync_buff *sb)
|
static inline void sb_queue_tail(struct ip_vs_sync_buff *sb)
|
||||||
|
@ -862,11 +866,6 @@ static int sync_thread(void *startup)
|
||||||
/* set the maximum length of sync message */
|
/* set the maximum length of sync message */
|
||||||
set_sync_mesg_maxlen(state);
|
set_sync_mesg_maxlen(state);
|
||||||
|
|
||||||
/* set up multicast address */
|
|
||||||
mcast_addr.sin_family = AF_INET;
|
|
||||||
mcast_addr.sin_port = htons(IP_VS_SYNC_PORT);
|
|
||||||
mcast_addr.sin_addr.s_addr = htonl(IP_VS_SYNC_GROUP);
|
|
||||||
|
|
||||||
add_wait_queue(&sync_wait, &wait);
|
add_wait_queue(&sync_wait, &wait);
|
||||||
|
|
||||||
set_sync_pid(state, task_pid_nr(current));
|
set_sync_pid(state, task_pid_nr(current));
|
||||||
|
|
Loading…
Reference in a new issue