Commit c09b8970 authored by zhang kai's avatar zhang kai Committed by Simon Horman

ipvs: no need to update skb route entry for local destination packets.

In the end of function __ip_vs_get_out_rt/__ip_vs_get_out_rt_v6,the
'local' variable is always zero.
Signed-off-by: default avatarzhang kai <zhangkaiheb@126.com>
Acked-by: default avatarJulian Anastasov <ja@ssi.bg>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
parent f8615bf8
...@@ -407,12 +407,9 @@ __ip_vs_get_out_rt(struct netns_ipvs *ipvs, int skb_af, struct sk_buff *skb, ...@@ -407,12 +407,9 @@ __ip_vs_get_out_rt(struct netns_ipvs *ipvs, int skb_af, struct sk_buff *skb,
goto err_put; goto err_put;
skb_dst_drop(skb); skb_dst_drop(skb);
if (noref) { if (noref)
if (!local) skb_dst_set_noref(skb, &rt->dst);
skb_dst_set_noref(skb, &rt->dst); else
else
skb_dst_set(skb, dst_clone(&rt->dst));
} else
skb_dst_set(skb, &rt->dst); skb_dst_set(skb, &rt->dst);
return local; return local;
...@@ -574,12 +571,9 @@ __ip_vs_get_out_rt_v6(struct netns_ipvs *ipvs, int skb_af, struct sk_buff *skb, ...@@ -574,12 +571,9 @@ __ip_vs_get_out_rt_v6(struct netns_ipvs *ipvs, int skb_af, struct sk_buff *skb,
goto err_put; goto err_put;
skb_dst_drop(skb); skb_dst_drop(skb);
if (noref) { if (noref)
if (!local) skb_dst_set_noref(skb, &rt->dst);
skb_dst_set_noref(skb, &rt->dst); else
else
skb_dst_set(skb, dst_clone(&rt->dst));
} else
skb_dst_set(skb, &rt->dst); skb_dst_set(skb, &rt->dst);
return local; return local;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment