]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
sit: remove unnecessary protocol check in ipip6_tunnel_xmit()
authorSimon Horman <simon.horman@netronome.com>
Thu, 9 Jun 2016 09:03:34 +0000 (18:03 +0900)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Jun 2016 18:23:37 +0000 (11:23 -0700)
ipip6_tunnel_xmit() is called immediately after checking that
skb->protocol is  htons(ETH_P_IPV6) so there is no need
to check it a second time.

Found by inspection.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Dinan Gunawardena <dinan.gunawardena@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/sit.c

index 0a5a255277e562ecb11ab703d964143f21bf85cd..d9f2bd6ef72dbb008f80d2e5fe8ab6f59e0be814 100644 (file)
@@ -825,9 +825,6 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
        u8 protocol = IPPROTO_IPV6;
        int t_hlen = tunnel->hlen + sizeof(struct iphdr);
 
-       if (skb->protocol != htons(ETH_P_IPV6))
-               goto tx_error;
-
        if (tos == 1)
                tos = ipv6_get_dsfield(iph6);