if (fill) {
elt = ebmb_entry(node, struct pattern_tree, node);
static_pattern.smp = elt->smp;
+ static_pattern.ref = elt->ref;
static_pattern.flags = PAT_F_TREE;
static_pattern.type = SMP_T_STR;
static_pattern.ptr.str = (char *)elt->node.key;
if (fill) {
elt = ebmb_entry(node, struct pattern_tree, node);
static_pattern.smp = elt->smp;
+ static_pattern.ref = elt->ref;
static_pattern.flags = PAT_F_TREE;
static_pattern.type = SMP_T_IPV4;
memcpy(&static_pattern.val.ipv4.addr.s_addr, elt->node.key, 4);
if (fill) {
elt = ebmb_entry(node, struct pattern_tree, node);
static_pattern.smp = elt->smp;
+ static_pattern.ref = elt->ref;
static_pattern.flags = PAT_F_TREE;
static_pattern.type = SMP_T_IPV6;
memcpy(&static_pattern.val.ipv6.addr, elt->node.key, 16);
if (fill) {
elt = ebmb_entry(node, struct pattern_tree, node);
static_pattern.smp = elt->smp;
+ static_pattern.ref = elt->ref;
static_pattern.flags = PAT_F_TREE;
static_pattern.type = SMP_T_IPV6;
memcpy(&static_pattern.val.ipv6.addr, elt->node.key, 16);
if (fill) {
elt = ebmb_entry(node, struct pattern_tree, node);
static_pattern.smp = elt->smp;
+ static_pattern.ref = elt->ref;
static_pattern.flags = PAT_F_TREE;
static_pattern.type = SMP_T_IPV4;
memcpy(&static_pattern.val.ipv4.addr.s_addr, elt->node.key, 4);
/* copy the pointer to sample associated to this node */
node->smp = pat->smp;
+ node->ref = pat->ref;
/* FIXME: insert <addr>/<mask> into the tree here */
memcpy(node->node.key, &pat->val.ipv4.addr, 4); /* network byte order */
/* copy the pointer to sample associated to this node */
node->smp = pat->smp;
+ node->ref = pat->ref;
/* FIXME: insert <addr>/<mask> into the tree here */
memcpy(node->node.key, &pat->val.ipv6.addr, 16); /* network byte order */
/* copy the pointer to sample associated to this node */
node->smp = pat->smp;
+ node->ref = pat->ref;
/* copy the string */
memcpy(node->node.key, pat->ptr.str, len);
memset(&pattern, 0, sizeof(pattern));
pattern.flags = patflags;
pattern.smp = smp;
+ pattern.ref = elt;
/* parse pattern */
if (!expr->pat_head->parse(elt->pattern, &pattern, err)) {
if (!head->match) {
if (fill) {
static_pattern.smp = NULL;
+ static_pattern.ref = NULL;
static_pattern.flags = 0;
static_pattern.type = SMP_T_UINT;
static_pattern.val.i = 1;