Missed one last ntohs() on UDP destination port.
This commit is contained in:
@@ -586,12 +586,12 @@ int xdp_prog_main(struct xdp_md *ctx)
|
||||
}
|
||||
|
||||
// Destination port checks.
|
||||
if (filter->udp.do_dport_min && udph->dest < filter->udp.dport_min)
|
||||
if (filter->udp.do_dport_min && ntohs(udph->dest) < filter->udp.dport_min)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (filter->udp.do_dport_max && udph->dest > filter->udp.dport_max)
|
||||
if (filter->udp.do_dport_max && ntohs(udph->dest) > filter->udp.dport_max)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user