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/libip6t_rt.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'extensions/libip6t_rt.c') diff --git a/extensions/libip6t_rt.c b/extensions/libip6t_rt.c index d470488d..cada7799 100644 --- a/extensions/libip6t_rt.c +++ b/extensions/libip6t_rt.c @@ -99,6 +99,13 @@ parse_addresses(const char *addrstr, struct in6_addr *addrp) return i; } +static void rt_init(struct xt_entry_match *m) +{ + struct ip6t_rt *rtinfo = (void *)m->data; + + rtinfo->segsleft[1] = ~0U; +} + static void rt_parse(struct xt_option_call *cb) { struct ip6t_rt *rtinfo = cb->data; @@ -245,6 +252,7 @@ static struct xtables_match rt_mt6_reg = { .size = XT_ALIGN(sizeof(struct ip6t_rt)), .userspacesize = XT_ALIGN(sizeof(struct ip6t_rt)), .help = rt_help, + .init = rt_init, .x6_parse = rt_parse, .print = rt_print, .save = rt_save, -- cgit v1.2.3