diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-07-11 05:55:16 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-07-11 05:58:33 -0400 |
commit | 4edfa9d0bf9ee9c34ee58b80ea1f146677497de9 (patch) | |
tree | 707a8caf43bba3c8de8f51045ebf58e495f8ae93 /net/netfilter | |
parent | c8607e020014cf11a61601a0005270bad81cabdf (diff) | |
parent | 3777ed688fba82d0bd43f9fc1ebbc6abe788576d (diff) |
Merge tag 'ipvs-fixes2-for-v4.7' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs
Simon Horman says:
====================
Second Round of IPVS Fixes for v4.7
The fix from Quentin Armitage allows the backup sync daemon to
be bound to a link-local mcast IPv6 address as is already the case
for IPv4.
====================
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_sync.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c index 803001a45aa1..1b07578bedf3 100644 --- a/net/netfilter/ipvs/ip_vs_sync.c +++ b/net/netfilter/ipvs/ip_vs_sync.c | |||
@@ -1545,7 +1545,8 @@ error: | |||
1545 | /* | 1545 | /* |
1546 | * Set up receiving multicast socket over UDP | 1546 | * Set up receiving multicast socket over UDP |
1547 | */ | 1547 | */ |
1548 | static struct socket *make_receive_sock(struct netns_ipvs *ipvs, int id) | 1548 | static struct socket *make_receive_sock(struct netns_ipvs *ipvs, int id, |
1549 | int ifindex) | ||
1549 | { | 1550 | { |
1550 | /* multicast addr */ | 1551 | /* multicast addr */ |
1551 | union ipvs_sockaddr mcast_addr; | 1552 | union ipvs_sockaddr mcast_addr; |
@@ -1566,6 +1567,7 @@ static struct socket *make_receive_sock(struct netns_ipvs *ipvs, int id) | |||
1566 | set_sock_size(sock->sk, 0, result); | 1567 | set_sock_size(sock->sk, 0, result); |
1567 | 1568 | ||
1568 | get_mcast_sockaddr(&mcast_addr, &salen, &ipvs->bcfg, id); | 1569 | get_mcast_sockaddr(&mcast_addr, &salen, &ipvs->bcfg, id); |
1570 | sock->sk->sk_bound_dev_if = ifindex; | ||
1569 | result = sock->ops->bind(sock, (struct sockaddr *)&mcast_addr, salen); | 1571 | result = sock->ops->bind(sock, (struct sockaddr *)&mcast_addr, salen); |
1570 | if (result < 0) { | 1572 | if (result < 0) { |
1571 | pr_err("Error binding to the multicast addr\n"); | 1573 | pr_err("Error binding to the multicast addr\n"); |
@@ -1868,7 +1870,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c, | |||
1868 | if (state == IP_VS_STATE_MASTER) | 1870 | if (state == IP_VS_STATE_MASTER) |
1869 | sock = make_send_sock(ipvs, id); | 1871 | sock = make_send_sock(ipvs, id); |
1870 | else | 1872 | else |
1871 | sock = make_receive_sock(ipvs, id); | 1873 | sock = make_receive_sock(ipvs, id, dev->ifindex); |
1872 | if (IS_ERR(sock)) { | 1874 | if (IS_ERR(sock)) { |
1873 | result = PTR_ERR(sock); | 1875 | result = PTR_ERR(sock); |
1874 | goto outtinfo; | 1876 | goto outtinfo; |