Skip to content

Commit

Permalink
sit: remove unnecessary protocol check in ipip6_tunnel_xmit()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon Horman authored and David S. Miller committed Jun 9, 2016
1 parent b8d99ba commit adba931
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit adba931

Please sign in to comment.