ipvs: remove unnecessary assignment in __ip_vs_get_out_rt
Subsystems (3)
PATCH 1/1 ipvs: remove unnecessary assignment in __ip_vs_get_out_rt
It is a precondition of the function that daddr be equal to dest->addr.ip if dest is non-NULL, so this additional assignment is just confusing for stupid engineers like me.
--- net/netfilter/ipvs/ip_vs_xmit.c | 1 - 1 file changed, 1 deletion(-)
net/netfilter/ipvs/ip_vs_xmit.c +0 -1
@@ -293,7 +293,6 @@ __ip_vs_get_out_rt(int skb_af, struct sk_buff *skb, struct ip_vs_dest *dest, &dest->addr.ip, &dest_dst->dst_saddr.ip, atomic_read(&rt->dst.__refcnt)); } - daddr = dest->addr.ip;if (ret_saddr) *ret_saddr = dest_dst->dst_saddr.ip; }else {
Signature · 1 line
Alex Gartrell <[email protected]>
Hello,
Quoted 5 lines · Alex Gartrell
It is a precondition of the function that daddr be equal to
dest->addr.ipif dest is non-NULL, so this additional assignment is just confusing for stupid engineers like me.Signed-off-by Alex Gartrell <[email protected]>
Looks like this line appeared unexpectedly
in commit "ipvs: Eliminate rt->rt_dst usage in __ip_vs_get_out_rt()."
Quoted 18 lines
--- net/netfilter/ipvs/ip_vs_xmit.c | 1 - 1 file changed, 1 deletion(-)net/netfilter/ipvs/ip_vs_xmit.c +0
-1@@ -293,7 +293,6 @@ __ip_vs_get_out_rt(int skb_af, struct sk_buff *skb, struct ip_vs_dest *dest, &dest->addr.ip, &dest_dst->dst_saddr.ip, atomic_read(&rt->dst.__refcnt)); } - daddr = dest->addr.ip;if (ret_saddr) *ret_saddr = dest_dst->dst_saddr.ip; }else {Signature · 1 line
Alex Gartrell <[email protected]>
Regards
--
Julian Anastasov <[email protected]>
Simon Horman
maintainerQuoted 9 lines · Julian Anastasov
Hello,
Quoted 4 lines · Alex Gartrell
It is a precondition of the function that daddr be equal to
dest->addr.ipif dest is non-NULL, so this additional assignment is just confusing for stupid engineers like me.
Quoted 6 lines
Quoted 1 line
Signed-off-by Alex Gartrell <[email protected]>Acked-by Julian Anastasov <[email protected]>Looks like this line appeared unexpectedly
in commit "ipvs: Eliminatert->rt_dstusage in__ip_vs_get_out_rt()."
Thanks, I have applied this to ipvs-next and will see about getting it included in v3.18.
Quoted 24 lines
Quoted 18 lines
--- net/netfilter/ipvs/ip_vs_xmit.c | 1 - 1 file changed, 1 deletion(-)net/netfilter/ipvs/ip_vs_xmit.c +0
-1@@ -293,7 +293,6 @@ __ip_vs_get_out_rt(int skb_af, struct sk_buff *skb, struct ip_vs_dest *dest, &dest->addr.ip, &dest_dst->dst_saddr.ip, atomic_read(&rt->dst.__refcnt)); } - daddr = dest->addr.ip;if (ret_saddr) *ret_saddr = dest_dst->dst_saddr.ip; }else {Signature · 1 line
Alex Gartrell <[email protected]>Regards
--
Julian Anastasov <[email protected]>