[RHEL7,COMMIT] net: drop redandunt saddr assignment in ip_send_unicast_reply()

Submitted by Konstantin Khorenko on Dec. 18, 2017, 3:13 p.m.

Details

Message ID 201712181513.vBIFD3od014321@finist_ce7.work
State New
Series "net: drop redandunt saddr assignment in ip_send_unicast_reply()"
Headers show

Commit Message

Konstantin Khorenko Dec. 18, 2017, 3:13 p.m.
The commit is pushed to "branch-rh7-3.10.0-693.11.1.vz7.39.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.11.1.vz7.39.7
------>
commit 465c79cf625d05bbcd5b288530aaf7546c9632a8
Author: Konstantin Khorenko <khorenko@virtuozzo.com>
Date:   Mon Dec 18 18:13:03 2017 +0300

    net: drop redandunt saddr assignment in ip_send_unicast_reply()
    
    Revert "to review: net: provide proper saddr to flowi4_init_output()"
    
    This is a leftover from the 2.6.32-x -> 3.10.0-x rebase.
    After ms commit 70e7341673a4 ("ipv4: Show that ip_send_reply() is purely
    unicast routine.") which adds "saddr" to ip_send_unicast_reply()
    argument list we don't need to extract saddr from skb additionally.
    
    Drop it.
    No functonal changes as all calls to ip_send_unicast_reply()
    provide same ip_hdr(skb)->daddr as "saddr" argument.
    
    Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 net/ipv4/ip_output.c | 1 -
 1 file changed, 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index c721c151770e..9fa476280b6b 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1565,7 +1565,6 @@  void ip_send_unicast_reply(struct sock *sk, struct sk_buff *skb,
 	if (__ip_options_echo(&replyopts.opt.opt, skb, sopt))
 		return;
 
-	saddr = ip_hdr(skb)->daddr;
 	ipc.addr = daddr;
 	ipc.opt = NULL;
 	ipc.tx_flags = 0;