net: ipv6: remove skb_reserve in getroute
authorDavid Ahern <dsa@cumulusnetworks.com>
Thu, 26 Jan 2017 22:08:36 +0000 (14:08 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Jan 2017 23:36:58 +0000 (18:36 -0500)
Remove skb_reserve and skb_reset_mac_header from inet6_rtm_getroute. The
allocated skb is not passed through the routing engine (like it is for
IPv4) and has not since the beginning of git time.

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c

index 4b1f0f98a0e92d1078c8c4f467d482ed60e32c9d..74bb1190800ea9b98213be09f066df9fedf9980f 100644 (file)
@@ -3416,12 +3416,6 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh)
                goto errout;
        }
 
-       /* Reserve room for dummy headers, this skb can pass
-          through good chunk of routing engine.
-        */
-       skb_reset_mac_header(skb);
-       skb_reserve(skb, MAX_HEADER + sizeof(struct ipv6hdr));
-
        skb_dst_set(skb, &rt->dst);
 
        err = rt6_fill_node(net, skb, rt, &fl6.daddr, &fl6.saddr, iif,