Skip to content

Commit

Permalink
udp_do_validate_packet - return after invalid packet (zmap#689)
Browse files Browse the repository at this point in the history
  • Loading branch information
donners authored Mar 23, 2022
1 parent baee71e commit 1a6b597
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/probe_modules/module_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ int udp_do_validate_packet(const struct ip *ip_hdr, uint32_t len,
if (icmp_helper_validate(ip_hdr, len, sizeof(struct udphdr),
&ip_inner,
&ip_inner_len) == PACKET_INVALID) {
return PACKET_INVALID;
}
struct udphdr *udp = get_udp_header(ip_inner, ip_inner_len);
// we can always check the destination port because this is the
Expand Down

0 comments on commit 1a6b597

Please sign in to comment.