]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - net/netfilter/nf_conntrack_helper.c
udp: enable busy polling for all sockets
[mirror_ubuntu-jammy-kernel.git] / net / netfilter / nf_conntrack_helper.c
index 336e21559e011d4f0fe154934ecf7d5a765aefdd..7341adf7059d3232f458bc02528d9631107ebfce 100644 (file)
@@ -138,9 +138,14 @@ __nf_conntrack_helper_find(const char *name, u16 l3num, u8 protonum)
 
        for (i = 0; i < nf_ct_helper_hsize; i++) {
                hlist_for_each_entry_rcu(h, &nf_ct_helper_hash[i], hnode) {
-                       if (!strcmp(h->name, name) &&
-                           h->tuple.src.l3num == l3num &&
-                           h->tuple.dst.protonum == protonum)
+                       if (strcmp(h->name, name))
+                               continue;
+
+                       if (h->tuple.src.l3num != NFPROTO_UNSPEC &&
+                           h->tuple.src.l3num != l3num)
+                               continue;
+
+                       if (h->tuple.dst.protonum == protonum)
                                return h;
                }
        }