Commit 1f7f10ac authored by Maciej Żenczykowski's avatar Maciej Żenczykowski Committed by David S. Miller

net: ip6_redirect() - use new style struct initializer instead of memset

(allows for better compiler optimization)
Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e8e3fbe9
...@@ -2508,16 +2508,15 @@ void ip6_redirect(struct sk_buff *skb, struct net *net, int oif, u32 mark, ...@@ -2508,16 +2508,15 @@ void ip6_redirect(struct sk_buff *skb, struct net *net, int oif, u32 mark,
{ {
const struct ipv6hdr *iph = (struct ipv6hdr *) skb->data; const struct ipv6hdr *iph = (struct ipv6hdr *) skb->data;
struct dst_entry *dst; struct dst_entry *dst;
struct flowi6 fl6; struct flowi6 fl6 = {
.flowi6_iif = LOOPBACK_IFINDEX,
memset(&fl6, 0, sizeof(fl6)); .flowi6_oif = oif,
fl6.flowi6_iif = LOOPBACK_IFINDEX; .flowi6_mark = mark,
fl6.flowi6_oif = oif; .daddr = iph->daddr,
fl6.flowi6_mark = mark; .saddr = iph->saddr,
fl6.daddr = iph->daddr; .flowlabel = ip6_flowinfo(iph),
fl6.saddr = iph->saddr; .flowi6_uid = uid,
fl6.flowlabel = ip6_flowinfo(iph); };
fl6.flowi6_uid = uid;
dst = ip6_route_redirect(net, &fl6, skb, &ipv6_hdr(skb)->saddr); dst = ip6_route_redirect(net, &fl6, skb, &ipv6_hdr(skb)->saddr);
rt6_do_redirect(dst, NULL, skb); rt6_do_redirect(dst, NULL, skb);
......
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