http://bugzilla.netfilter.org/show_bug.cgi?id=577
When using the -m policy match, the option argument for --spi is converted
using strtol(), which returns a signed 32 bit value, so the highest
positive value is 0x7fffffff. Instead strtoul() should be used.
The same applies for the --reqid option argument.
Signed-off-by: Patrick McHardy <kaber@trash.net>
e->match.reqid = 1;
e->invert.reqid = invert;
- e->reqid = strtol(argv[optind-1], NULL, 10);
+ e->reqid = strtoul(argv[optind-1], NULL, 10);
break;
case '5':
if (e->match.spi)
e->match.spi = 1;
e->invert.spi = invert;
- e->spi = strtol(argv[optind-1], NULL, 0x10);
+ e->spi = strtoul(argv[optind-1], NULL, 0x10);
break;
case '6':
if (e->match.saddr)
e->match.reqid = 1;
e->invert.reqid = invert;
- e->reqid = strtol(argv[optind-1], NULL, 10);
+ e->reqid = strtoul(argv[optind-1], NULL, 10);
break;
case '5':
if (e->match.spi)
e->match.spi = 1;
e->invert.spi = invert;
- e->spi = strtol(argv[optind-1], NULL, 0x10);
+ e->spi = strtoul(argv[optind-1], NULL, 0x10);
break;
case '6':
if (e->match.saddr)