static void connlabel_mt_parse(struct xt_option_call *cb) { struct xt_connlabel_mtinfo *info = cb->data; bool have_labelmap = !connlabel_open(); int tmp; xtables_option_parse(cb); switch (cb->entry->id) { case O_LABEL: if (have_labelmap) tmp = nfct_labelmap_get_bit(map, cb->arg); else tmp = connlabel_value_parse(cb->arg); if (tmp < 0) xtables_error(PARAMETER_PROBLEM, "label '%s' not found or invalid value", cb->arg); info->bit = tmp; if (cb->invert) info->options |= XT_CONNLABEL_OP_INVERT; break; case O_SET: info->options |= XT_CONNLABEL_OP_SET; break; } }
static const char *connlabel_get_name(int b) { const char *name; connlabel_open(); name = nfct_labelmap_get_name(map, b); if (name && strcmp(name, "")) return name; return NULL; }