static void pf_addr_test_print(const char *prefix, const char *prefix2, const struct context *src, const struct mroute_addr *dest, const bool allow, const struct ipv4_subnet *rule) { struct gc_arena gc = gc_new(); if (rule) { dmsg(D_PF_DEBUG, "PF: %s/%s %s %s %s rule=[%s/%s %s]", prefix, prefix2, tls_common_name(src->c2.tls_multi, false), mroute_addr_print_ex(dest, MAPF_SHOW_ARP, &gc), drop_accept(allow), print_in_addr_t(rule->network, 0, &gc), print_in_addr_t(rule->netmask, 0, &gc), drop_accept(!rule->exclude)); } else { dmsg(D_PF_DEBUG, "PF: %s/%s %s %s %s", prefix, prefix2, tls_common_name(src->c2.tls_multi, false), mroute_addr_print_ex(dest, MAPF_SHOW_ARP, &gc), drop_accept(allow)); } gc_free(&gc); }
const char * mroute_addr_print (const struct mroute_addr *ma, struct gc_arena *gc) { return mroute_addr_print_ex (ma, MAPF_IA_EMPTY_IF_UNDEF, gc); }