+#ifdef linux
+ int match = 0;
+ struct sk_buff *skb = ((struct mbuf *)inp)->m_skb;
+
+ if (*ugid_lookupp == 0) { /* actively lookup and copy in cache */
+
+ /* returns null if any element of the chain up to file is null.
+ * if sk != NULL then we also have a reference
+ */
+ *ugid_lookupp = linux_lookup(proto,
+ src_ip.s_addr, htons(src_port),
+ dst_ip.s_addr, htons(dst_port),
+ skb, oif ? 1 : 0, ugp);
+
+ }
+ if (*ugid_lookupp < 0)
+ return 0;
+
+ if (insn->o.opcode == O_UID)
+ match = (ugp->fw_uid == (uid_t)insn->d[0]);
+ else if (insn->o.opcode == O_JAIL)
+ match = (ugp->fw_groups[1] == (uid_t)insn->d[0]);
+ else if (insn->o.opcode == O_GID)
+ match = (ugp->fw_groups[0] == (uid_t)insn->d[0]);
+
+ return match;
+
+#else /* FreeBSD */
+