summaryrefslogtreecommitdiffstats
path: root/src/config.y
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-12 18:05:27 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-12 18:05:27 +0200
commitd351a2403c5946d07ae6e6b6e075ff9896c6bcb6 (patch)
tree0390de88edfbc9aedc4f4f7f1d54a783398d9218 /src/config.y
parent02c3f0d648a00032b4cfc8d3f558d08c3fb2d5d9 (diff)
downloadfastd-d351a2403c5946d07ae6e6b6e075ff9896c6bcb6.tar
fastd-d351a2403c5946d07ae6e6b6e075ff9896c6bcb6.zip
Improve integer checks
Diffstat (limited to 'src/config.y')
-rw-r--r--src/config.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config.y b/src/config.y
index deaa100..55d0e94 100644
--- a/src/config.y
+++ b/src/config.y
@@ -311,7 +311,7 @@ bind_default:
;
mtu: TOK_UINT {
- if ($1 > 65535) {
+ if (conf->mtu < 576 || $1 > 65535) {
fastd_config_error(&@$, ctx, conf, filename, depth, "invalid MTU");
YYERROR;
}
@@ -544,7 +544,7 @@ colon_or_port: ':'
;
port: colon_or_port TOK_UINT {
- if ($2 > 65535) {
+ if ($2 < 1 || $2 > 65535) {
fastd_config_error(&@$, ctx, conf, filename, depth, "invalid port");
YYERROR;
}