summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorMaciej Żenczykowski <maze@google.com>2018-09-30 08:44:51 +0200
committerDavid S. Miller <davem@davemloft.net>2018-10-03 01:12:40 +0200
commitdc92095dd92a955761b4779fed9618d407f8123b (patch)
tree4934b1536a9ea5f82397939fefe39cacaec9fb65 /net/ipv6
parentnet: remove 1 always zero parameter from ip6_redirect_no_header() (diff)
downloadlinux-dc92095dd92a955761b4779fed9618d407f8123b.tar.xz
linux-dc92095dd92a955761b4779fed9618d407f8123b.zip
net: ip6_update_pmtu() - use new style struct initializer instead of memset
(allows for better compiler optimization) Signed-off-by: Maciej Żenczykowski <maze@google.com> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/route.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index e50525a95a09..dd19cf8dbcc1 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2349,15 +2349,14 @@ void ip6_update_pmtu(struct sk_buff *skb, struct net *net, __be32 mtu,
{
const struct ipv6hdr *iph = (struct ipv6hdr *) skb->data;
struct dst_entry *dst;
- struct flowi6 fl6;
-
- memset(&fl6, 0, sizeof(fl6));
- fl6.flowi6_oif = oif;
- fl6.flowi6_mark = mark ? mark : IP6_REPLY_MARK(net, skb->mark);
- fl6.daddr = iph->daddr;
- fl6.saddr = iph->saddr;
- fl6.flowlabel = ip6_flowinfo(iph);
- fl6.flowi6_uid = uid;
+ struct flowi6 fl6 = {
+ .flowi6_oif = oif,
+ .flowi6_mark = mark ? mark : IP6_REPLY_MARK(net, skb->mark),
+ .daddr = iph->daddr,
+ .saddr = iph->saddr,
+ .flowlabel = ip6_flowinfo(iph),
+ .flowi6_uid = uid,
+ };
dst = ip6_route_output(net, NULL, &fl6);
if (!dst->error)