void
ea_format_bitfield(const struct eattr *a, byte *buf, int bufsize, const char **names, int min, int max)
{
+ byte *start = buf;
byte *bound = buf + bufsize - 32;
u32 data = a->u.data;
int i;
return;
}
- buf += bsprintf(buf, " %s", names[i]);
+ buf += bsprintf(buf, "%s ", names[i]);
data &= ~(1u << i);
}
if (data)
- bsprintf(buf, " %08x", data);
+ bsprintf(buf, "%08x ", data);
+ if (buf != start)
+ buf--;
+
+ *buf = 0;
return;
}
attr_bit: KRT_FEATURE_ALLFRAG { $$ = f_new_dynamic_attr_bit(3, "krt_features"); } ;
/* Using attribute bits in filters (moved here to not confuse Bison on *BSD) */
-lvalue: attr_bit { $$ = (struct f_lval) { .type = F_LVAL_ATTR_BIT, .fab = $1 }; };
+lvalue: attr_bit { $$ = (struct f_lval) { .type = F_LVAL_ATTR_BIT, .fab = $1, .rte = f_new_inst(FI_CURRENT_ROUTE), }; };
CF_CODE