diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2003-07-17 21:54:19 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2003-07-17 21:54:19 +0000 |
commit | 5b6f99bd5f3b0a96ef1f8a7dedc0a964c47aed07 (patch) | |
tree | 679038fa14b585877f652c6a6398ed26fd6c71c1 /userspace/ebtables2 | |
parent | bdf68a5ae7fe2cb4b95eb9075f8b9e7e7546dc49 (diff) |
*** empty log message ***
Diffstat (limited to 'userspace/ebtables2')
-rw-r--r-- | userspace/ebtables2/extensions/ebt_stp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/userspace/ebtables2/extensions/ebt_stp.c b/userspace/ebtables2/extensions/ebt_stp.c index 0723bee..a1b2c72 100644 --- a/userspace/ebtables2/extensions/ebt_stp.c +++ b/userspace/ebtables2/extensions/ebt_stp.c @@ -87,7 +87,7 @@ void print_mac_and_mask(const char *mac, const char *mask); uint32_t _tmp2; \ char *_tmp; \ _tmp2 = strtoul(s, &_tmp, 0); \ - if (_tmp) \ + if (*_tmp != '\0') \ return -1; \ if (size == 2) { \ if (_tmp2 >= (1 << 16)) \ @@ -132,6 +132,8 @@ static int parse(int c, char **argv, int argc, const struct ebt_u_entry *entry, long int i; char *end = NULL; + if (c < 'a' || c > ('a' + STP_NUMOPS - 1)) + return 0; flag = 1 << (c - 'a'); check_option(flags, flag); if (check_inverse(optarg)) @@ -219,7 +221,7 @@ static int parse(int c, char **argv, int argc, const struct ebt_u_entry *entry, print_error("Bad STP config sender address"); break; default: - print_error("This shouldn't happen"); + print_error("stp match: this shouldn't happen"); } return 1; } |