Allow only layer 3 filtering.
This commit is contained in:
@@ -319,20 +319,6 @@ int xdp_prog_main(struct xdp_md *ctx)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check layer 4 filters.
|
|
||||||
if (iph->protocol == IPPROTO_TCP && !filter[i]->tcpopts.enabled)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (iph->protocol == IPPROTO_UDP && !filter[i]->udpopts.enabled)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (iph->protocol == IPPROTO_ICMP && !filter[i]->icmpopts.enabled)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Do TCP options.
|
// Do TCP options.
|
||||||
if (iph->protocol == IPPROTO_TCP && filter[i]->tcpopts.enabled)
|
if (iph->protocol == IPPROTO_TCP && filter[i]->tcpopts.enabled)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user