bpf: return TC_ACT_UNSPEC to allow other filters to proceed
authorFelix Fietkau <nbd@nbd.name>
Thu, 17 Mar 2022 08:00:48 +0000 (09:00 +0100)
committerFelix Fietkau <nbd@nbd.name>
Thu, 17 Mar 2022 08:01:03 +0000 (09:01 +0100)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
qosify-bpf.c

index 0bddddf7309c3c7f2bc31a5a62f49797e271ac72..54a1e38e266842a716fbf3858d1fb16dd3912b49 100644 (file)
@@ -478,7 +478,7 @@ int classify(struct __sk_buff *skb)
 
        config = get_config();
        if (!config)
-               return TC_ACT_OK;
+               return TC_ACT_UNSPEC;
 
        if (module_flags & QOSIFY_IP_ONLY)
                type = skb->protocol;
@@ -491,7 +491,7 @@ int classify(struct __sk_buff *skb)
        else if (type == bpf_htons(ETH_P_IPV6))
                ip_val = parse_ipv6(config, skb, &offset, ingress, &dscp);
        else
-               return TC_ACT_OK;
+               return TC_ACT_UNSPEC;
 
        if (ip_val) {
                if (!ip_val->seen)
@@ -500,13 +500,13 @@ int classify(struct __sk_buff *skb)
        }
 
        if (dscp_lookup_class(&dscp, ingress, &class))
-               return TC_ACT_OK;
+               return TC_ACT_UNSPEC;
 
        if (class) {
                check_flow(&class->config, skb, &dscp);
 
                if (dscp_lookup_class(&dscp, ingress, &class))
-                       return TC_ACT_OK;
+                       return TC_ACT_UNSPEC;
        }
 
        dscp &= GENMASK(5, 0);
@@ -518,7 +518,7 @@ int classify(struct __sk_buff *skb)
        else if (type == bpf_htons(ETH_P_IPV6))
                ipv6_change_dsfield(skb, iph_offset, INET_ECN_MASK, dscp, force);
 
-       return TC_ACT_OK;
+       return TC_ACT_UNSPEC;
 }
 
 char _license[] SEC("license") = "GPL";