Skip to content

Commit adba931

Browse files
shorman-netronomedavem330
authored andcommitted
sit: remove unnecessary protocol check in ipip6_tunnel_xmit()
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 <[email protected]> Reviewed-by: Dinan Gunawardena <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b8d99ba commit adba931

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

net/ipv6/sit.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,9 +825,6 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
825825
u8 protocol = IPPROTO_IPV6;
826826
int t_hlen = tunnel->hlen + sizeof(struct iphdr);
827827

828-
if (skb->protocol != htons(ETH_P_IPV6))
829-
goto tx_error;
830-
831828
if (tos == 1)
832829
tos = ipv6_get_dsfield(iph6);
833830

0 commit comments

Comments
 (0)