nat_conn_keys_insert(struct hmap *nat_conn_keys, const struct conn *nat_conn,
                     uint32_t basis)
{
    struct nat_conn_key_node *nat_conn_key_node =
        nat_conn_keys_lookup(nat_conn_keys, &nat_conn->rev_key, basis);

    if (!nat_conn_key_node) {
        struct nat_conn_key_node *nat_conn_key = xzalloc(sizeof *nat_conn_key);
        memcpy(&nat_conn_key->key, &nat_conn->rev_key,
               sizeof nat_conn_key->key);
        memcpy(&nat_conn_key->value, &nat_conn->key,
               sizeof nat_conn_key->value);
        hmap_insert(nat_conn_keys, &nat_conn_key->node,
                    conn_key_hash(&nat_conn_key->key, basis));
        return true;
    }
    return false;
}
nat_conn_keys_insert(struct hmap *nat_conn_keys, const struct conn *nat_conn,
                     uint32_t basis)
{
    struct nat_conn_key_node *nat_conn_key_node =
        nat_conn_keys_lookup(nat_conn_keys, &nat_conn->rev_key, basis);

    if (!nat_conn_key_node) {
        struct nat_conn_key_node *nat_conn_key = xzalloc(sizeof *nat_conn_key);
        memcpy(&nat_conn_key->key, &nat_conn->rev_key,
               sizeof nat_conn_key->key);
        memcpy(&nat_conn_key->value, &nat_conn->key,
               sizeof nat_conn_key->value);
        hmap_insert(nat_conn_keys, &nat_conn_key->node,
                    conn_key_hash(&nat_conn_key->key, basis));
        return true;
    }
    return false;
}