diff options
author | Willem de Bruijn <willemb@google.com> | 2018-07-06 10:12:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-07 10:58:49 +0900 |
commit | 351782067b6be81879b0af0daf7bd3acbb32d986 (patch) | |
tree | 636d78515302aeb0e8513fe7763d8e1ba0872d6c /net/ipv4/ip_output.c | |
parent | ab8565af68001ac5f9331daa311938ead3eb5636 (diff) | |
download | linux-351782067b6be81879b0af0daf7bd3acbb32d986.tar.gz linux-351782067b6be81879b0af0daf7bd3acbb32d986.tar.bz2 linux-351782067b6be81879b0af0daf7bd3acbb32d986.zip |
ipv4: ipcm_cookie initializers
Initialize the cookie in one location to reduce code duplication and
avoid bugs from inconsistent initialization, such as that fixed in
commit 9887cba19978 ("ip: limit use of gso_size to udp").
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 570e3ebc3974..81d0e4a77ec5 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -1548,12 +1548,8 @@ void ip_send_unicast_reply(struct sock *sk, struct sk_buff *skb, if (__ip_options_echo(net, &replyopts.opt.opt, skb, sopt)) return; + ipcm_init(&ipc); ipc.addr = daddr; - ipc.opt = NULL; - ipc.tx_flags = 0; - ipc.ttl = 0; - ipc.tos = -1; - ipc.sockc.transmit_time = 0; if (replyopts.opt.opt.optlen) { ipc.opt = &replyopts.opt; |