We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5a8cba commit 87fcebdCopy full SHA for 87fcebd
xdp-bpf2go-example/packetProtocol.c
@@ -28,14 +28,12 @@ int get_packet_protocol(struct xdp_md *ctx) {
28
return XDP_PASS;
29
30
// Check if the packet is an IP packet
31
- if (eth->h_proto != bpf_htons(ETH_P_IP)) {
+ if (eth->h_proto != bpf_htons(ETH_P_IP))
32
33
- }
34
35
// Parse IP header
36
- if ((void *)(ip + 1) > data_end) {
+ if ((void *)(ip + 1) > data_end)
37
38
39
40
if (count)
41
__sync_fetch_and_add(count, 1);
0 commit comments