diff options
Diffstat (limited to 'extensions/libip6t_dst.c')
-rw-r--r-- | extensions/libip6t_dst.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/extensions/libip6t_dst.c b/extensions/libip6t_dst.c index 215e2d95..e19abc4b 100644 --- a/extensions/libip6t_dst.c +++ b/extensions/libip6t_dst.c @@ -49,7 +49,7 @@ parse_opts_num(const char *idstr, const char *typestr) exit_error(PARAMETER_PROBLEM, "dst: error parsing %s `%s'", typestr, idstr); } - return (u_int32_t) id; + return id; } static int @@ -78,13 +78,12 @@ parse_options(const char *optsstr, u_int16_t *opts) *range++ = '\0'; } - opts[i] = (u_int16_t)((parse_opts_num(cp,"opt") & 0x000000FF)<<8); + opts[i] = (parse_opts_num(cp, "opt") & 0xFF) << 8; if (range) { if (opts[i] == 0) exit_error(PARAMETER_PROBLEM, "PAD0 hasn't got length"); - opts[i] |= (u_int16_t)(parse_opts_num(range,"length") & - 0x000000FF); + opts[i] |= parse_opts_num(range, "length") & 0xFF; } else opts[i] |= (0x00FF); @@ -126,7 +125,7 @@ static int dst_parse(int c, char **argv, int invert, unsigned int *flags, if (*flags & IP6T_OPTS_LEN) exit_error(PARAMETER_PROBLEM, "Only one `--dst-len' allowed"); - check_inverse(optarg, &invert, &optind, 0); + xtables_check_inverse(optarg, &invert, &optind, 0); optinfo->hdrlen = parse_opts_num(argv[optind-1], "length"); if (invert) optinfo->invflags |= IP6T_OPTS_INV_LEN; @@ -137,7 +136,7 @@ static int dst_parse(int c, char **argv, int invert, unsigned int *flags, if (*flags & IP6T_OPTS_OPTS) exit_error(PARAMETER_PROBLEM, "Only one `--dst-opts' allowed"); - check_inverse(optarg, &invert, &optind, 0); + xtables_check_inverse(optarg, &invert, &optind, 0); if (invert) exit_error(PARAMETER_PROBLEM, " '!' not allowed with `--dst-opts'"); |