Skip to content

Commit

Permalink
format...
Browse files Browse the repository at this point in the history
  • Loading branch information
fearful-symmetry committed Sep 18, 2024
1 parent b74eec9 commit fbe2a42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions GPL/Events/Network/Probe.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static int inet_csk_accept__exit(struct sock *sk)

static int udp_skb_handle(struct sk_buff *skb, enum ebpf_net_udp_info evt_type)
{
if (skb == NULL){
if (skb == NULL) {
goto out;
}

Expand Down Expand Up @@ -145,7 +145,7 @@ static int udp_skb_handle(struct sk_buff *skb, enum ebpf_net_udp_info evt_type)

ebpf_vl_fields__init(&event->vl_fields);
struct ebpf_varlen_field *field;
field = ebpf_vl_field__add(&event->vl_fields, EBPF_VL_FIELD_DNS_BODY);
field = ebpf_vl_field__add(&event->vl_fields, EBPF_VL_FIELD_DNS_BODY);
long ret = bpf_probe_read_kernel(field->data, headlen,
skb_head + transport_header_offset + sizeof(struct udphdr));
if (ret != 0) {
Expand Down
7 changes: 0 additions & 7 deletions testing/test_bins/udp_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@

char buffer[BUFFER_SIZE];

void create_buffer(uint8_t *buffer, size_t length)
{
for (size_t i = 0; i < length; i++) {
buffer[i] = 0xff;
}
}

int main(int argc, char **argv)
{
int sockfd;
Expand Down

0 comments on commit fbe2a42

Please sign in to comment.