Skip to content

Commit

Permalink
Merge tag 'ipvs4-for-v4.4' of https://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/horms/ipvs-next

Simon Horman says:

====================
Fourth Round of IPVS Updates for v4.4

please consider these build warning cleanups from David Ahern and myself.
They resolve some minor side effects of Eric Biederman' heroic work to
cleanup IPVS which you recently pulled: its queued up for v4.4 so no need
to worry about earlier kernel versions.
====================

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Pablo Neira Ayuso committed Oct 12, 2015
2 parents 4302f5e + 92240e8 commit d53195c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
13 changes: 5 additions & 8 deletions net/netfilter/ipvs/ip_vs_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1347,23 +1347,20 @@ static void ip_vs_conn_flush(struct netns_ipvs *ipvs)
*/
int __net_init ip_vs_conn_net_init(struct netns_ipvs *ipvs)
{
struct net *net = ipvs->net;

atomic_set(&ipvs->conn_count, 0);

proc_create("ip_vs_conn", 0, net->proc_net, &ip_vs_conn_fops);
proc_create("ip_vs_conn_sync", 0, net->proc_net, &ip_vs_conn_sync_fops);
proc_create("ip_vs_conn", 0, ipvs->net->proc_net, &ip_vs_conn_fops);
proc_create("ip_vs_conn_sync", 0, ipvs->net->proc_net,
&ip_vs_conn_sync_fops);
return 0;
}

void __net_exit ip_vs_conn_net_cleanup(struct netns_ipvs *ipvs)
{
struct net *net = ipvs->net;

/* flush all the connection entries first */
ip_vs_conn_flush(ipvs);
remove_proc_entry("ip_vs_conn", net->proc_net);
remove_proc_entry("ip_vs_conn_sync", net->proc_net);
remove_proc_entry("ip_vs_conn", ipvs->net->proc_net);
remove_proc_entry("ip_vs_conn_sync", ipvs->net->proc_net);
}

int __init ip_vs_conn_init(void)
Expand Down
3 changes: 1 addition & 2 deletions net/netfilter/ipvs/ip_vs_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,6 @@ handle_response(int af, struct sk_buff *skb, struct ip_vs_proto_data *pd,
static unsigned int
ip_vs_out(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff *skb, int af)
{
struct net *net = ipvs->net;
struct ip_vs_iphdr iph;
struct ip_vs_protocol *pp;
struct ip_vs_proto_data *pd;
Expand Down Expand Up @@ -1272,7 +1271,7 @@ ip_vs_out(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff *skb, in
#ifdef CONFIG_IP_VS_IPV6
if (af == AF_INET6) {
if (!skb->dev)
skb->dev = net->loopback_dev;
skb->dev = ipvs->net->loopback_dev;
icmpv6_send(skb,
ICMPV6_DEST_UNREACH,
ICMPV6_PORT_UNREACH,
Expand Down

0 comments on commit d53195c

Please sign in to comment.