diff --git a/net/ipv4/ipvs/ip_vs_core.c b/net/ipv4/ipvs/ip_vs_core.c --- a/net/ipv4/ipvs/ip_vs_core.c +++ b/net/ipv4/ipvs/ip_vs_core.c @@ -1080,7 +1080,7 @@ static struct nf_hook_ops ip_vs_out_ops .hook = ip_vs_out, .owner = THIS_MODULE, .pf = PF_INET, - .hooknum = NF_IP_FORWARD, + .hooknum = NF_IP_LOCAL_OUT, .priority = 100, }; diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c --- a/net/ipv4/ipvs/ip_vs_ctl.c +++ b/net/ipv4/ipvs/ip_vs_ctl.c @@ -670,12 +670,6 @@ __ip_vs_update_dest(struct ip_vs_service atomic_set(&dest->weight, udest->weight); conn_flags = udest->conn_flags | IP_VS_CONN_F_INACTIVE; - /* check if local node and update the flags */ - if (inet_addr_type(udest->addr) == RTN_LOCAL) { - conn_flags = (conn_flags & ~IP_VS_CONN_F_FWD_MASK) - | IP_VS_CONN_F_LOCALNODE; - } - /* set the IP_VS_CONN_F_NOOUTPUT flag if not masquerading/NAT */ if ((conn_flags & IP_VS_CONN_F_FWD_MASK) != 0) { conn_flags |= IP_VS_CONN_F_NOOUTPUT; diff --git a/net/ipv4/ipvs/ip_vs_xmit.c b/net/ipv4/ipvs/ip_vs_xmit.c --- a/net/ipv4/ipvs/ip_vs_xmit.c +++ b/net/ipv4/ipvs/ip_vs_xmit.c @@ -260,10 +260,6 @@ ip_vs_nat_xmit(struct sk_buff *skb, stru if (skb_cow(skb, rt->u.dst.dev->hard_header_len)) goto tx_error_put; - /* drop old route */ - dst_release(skb->dst); - skb->dst = &rt->u.dst; - /* mangle the packet */ if (pp->dnat_handler && !pp->dnat_handler(&skb, pp, cp)) goto tx_error; @@ -279,10 +275,8 @@ ip_vs_nat_xmit(struct sk_buff *skb, stru /* Another hack: avoid icmp_send in ip_fragment */ skb->local_df = 1; - IP_VS_XMIT(skb, rt); - LeaveFunction(10); - return NF_STOLEN; + return NF_ACCEPT; tx_error_icmp: dst_link_failure(skb);