Skip to content

Use-case for helpers: existentials vs. universals #45

@tnelson

Description

@tnelson

Suppose we have a relation:

TABLE needsnat(ipaddr, int);

such that if needsnat(a,b) then the subnet a/b needs to be natted.

We'd want separate Flowlog rules for both cases: when NAT is needed, and when it isn't. The first rule would have something like:

needsnat(addr, mask) AND p.nwSrc IN addr/mask

That works fine. The problem is with the complement rule. We need to cover the case where NOT p.nwSrc IN addr/mask for every tuple in the table. That is, we can't write:

needsnat(addr, mask) AND NOT p.nwSrc IN addr/mask

since that will use addr and mask existentially, not universally.

When we added ALL, we said that we'd keep an eye out for other places we needed universal behavior, and here one is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions