summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2003-07-17 21:54:19 +0000
committerBart De Schuymer <bdschuym@pandora.be>2003-07-17 21:54:19 +0000
commit926ee0b1a70875385c82b47ce9ae84aa27d6b6b3 (patch)
treed2c83cfd872573144239726000a5a89a5e4effe9 /extensions
parentdaf063843e46a1a52b69336b5fdfe437f4bf53ac (diff)
*** empty log message ***
Diffstat (limited to 'extensions')
-rw-r--r--extensions/ebt_stp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/extensions/ebt_stp.c b/extensions/ebt_stp.c
index 0723bee..a1b2c72 100644
--- a/extensions/ebt_stp.c
+++ b/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;
}