|
@@ -989,7 +989,11 @@ bool efx_ptp_is_ptp_tx(struct efx_nic *efx, struct sk_buff *skb)
|
|
|
skb->len >= PTP_MIN_LENGTH &&
|
|
|
skb->len <= MC_CMD_PTP_IN_TRANSMIT_PACKET_MAXNUM &&
|
|
|
likely(skb->protocol == htons(ETH_P_IP)) &&
|
|
|
+ skb_transport_header_was_set(skb) &&
|
|
|
+ skb_network_header_len(skb) >= sizeof(struct iphdr) &&
|
|
|
ip_hdr(skb)->protocol == IPPROTO_UDP &&
|
|
|
+ skb_headlen(skb) >=
|
|
|
+ skb_transport_offset(skb) + sizeof(struct udphdr) &&
|
|
|
udp_hdr(skb)->dest == htons(PTP_EVENT_PORT);
|
|
|
}
|
|
|
|