From 4264de1f270a0fac44dde8ece6fde0a879aebc8e Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 15 Jul 2015 14:53:39 +0200 Subject: extensions: restore matching any SPI id by default This is the same as commit v1.4.15-12-g8a988f6. If no id option is given, the extensions only match packets with a zero-valued identification field. This behavior deviates from what it used to do back in v1.4.10-273-g6944f2c^. Signed-off-by: Jan Engelhardt Signed-off-by: Pablo Neira Ayuso --- extensions/libxt_esp.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'extensions/libxt_esp.c') diff --git a/extensions/libxt_esp.c b/extensions/libxt_esp.c index 294338b4..773d6af8 100644 --- a/extensions/libxt_esp.c +++ b/extensions/libxt_esp.c @@ -21,6 +21,13 @@ static const struct xt_option_entry esp_opts[] = { XTOPT_TABLEEND, }; +static void esp_init(struct xt_entry_match *m) +{ + struct xt_esp *espinfo = (void *)m->data; + + espinfo->spis[1] = ~0U; +} + static void esp_parse(struct xt_option_call *cb) { struct xt_esp *espinfo = cb->data; @@ -86,6 +93,7 @@ static struct xtables_match esp_match = { .size = XT_ALIGN(sizeof(struct xt_esp)), .userspacesize = XT_ALIGN(sizeof(struct xt_esp)), .help = esp_help, + .init = esp_init, .print = esp_print, .save = esp_save, .x6_parse = esp_parse, -- cgit v1.2.3