diff options
| -rw-r--r-- | packet_dropper_new.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/packet_dropper_new.c b/packet_dropper_new.c index a59a3a4..3033b38 100644 --- a/packet_dropper_new.c +++ b/packet_dropper_new.c | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | #include <linux/ip.h> | 7 | #include <linux/ip.h> |
| 8 | #include <linux/icmp.h> | 8 | #include <linux/icmp.h> |
| 9 | #include <linux/if_vlan.h> | 9 | #include <linux/if_vlan.h> |
| 10 | //#include <arpa/inet.h> | ||
| 11 | 10 | ||
| 12 | struct { | 11 | struct { |
| 13 | __uint(type, BPF_MAP_TYPE_ARRAY); | 12 | __uint(type, BPF_MAP_TYPE_ARRAY); |
| @@ -61,9 +60,6 @@ int entry(struct xdp_md *ctx) { | |||
| 61 | // Determine if we need to further process this packet | 60 | // Determine if we need to further process this packet |
| 62 | //if (ip_src == 1946091487) { | 61 | //if (ip_src == 1946091487) { |
| 63 | bpf_printk("Incoming packet: %u\n", icmph->type); | 62 | bpf_printk("Incoming packet: %u\n", icmph->type); |
| 64 | if (icmph->ttl == 252) { | ||
| 65 | bpf_printk("Echo request data: %x", pingdata); | ||
| 66 | } | ||
| 67 | if (icmph->type == 2 || ip_src == 1946091487) { | 63 | if (icmph->type == 2 || ip_src == 1946091487) { |
| 68 | // This packet had a destination of 223.255.254.115, do something! | 64 | // This packet had a destination of 223.255.254.115, do something! |
| 69 | // bpf_printk("Got it!, setting rec..."); // Debug print | 65 | // bpf_printk("Got it!, setting rec..."); // Debug print |
