Commit 0309474b authored by Arturo Borrero Gonzalez's avatar Arturo Borrero Gonzalez
Browse files

New upstream version 1.8.2

parent 3bc9369c
......@@ -2077,6 +2077,28 @@ void xtables_print_num(uint64_t number, unsigned int format)
printf(FMT("%4lluT ","%lluT "), (unsigned long long)number);
}
void xtables_print_mac(const unsigned char *macaddress)
{
unsigned int i;
printf("%02x", macaddress[0]);
for (i = 1; i < 6; ++i)
printf(":%02x", macaddress[i]);
}
void xtables_print_mac_and_mask(const unsigned char *mac, const unsigned char *mask)
{
static const char hlpmsk[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
xtables_print_mac(mac);
if (memcmp(mask, hlpmsk, 6) == 0)
return;
printf("/");
xtables_print_mac(mask);
}
void xtables_parse_val_mask(struct xt_option_call *cb,
unsigned int *val, unsigned int *mask,
const struct xtables_lmap *lmap)
......@@ -2190,6 +2212,7 @@ struct xt_xlate *xt_xlate_alloc(int size)
if (xl->buf.data == NULL)
xtables_error(RESOURCE_PROBLEM, "OOM");
xl->buf.data[0] = '\0';
xl->buf.size = size;
xl->buf.rem = size;
xl->buf.off = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment