From 9ef4d441ad91ebcbc68bdae309122f128ed69f56 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 24 Mar 2015 03:36:49 +0100 Subject: Add support for defining the MTU per peer --- src/config.y | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/config.y') diff --git a/src/config.y b/src/config.y index e2bcb24..3cffa17 100644 --- a/src/config.y +++ b/src/config.y @@ -478,6 +478,7 @@ peer_statement: TOK_REMOTE peer_remote ';' | TOK_FLOAT peer_float ';' | TOK_KEY peer_key ';' | TOK_INTERFACE peer_interface ';' + | TOK_MTU peer_mtu ';' | TOK_INCLUDE peer_include ';' ; @@ -550,6 +551,15 @@ peer_interface: TOK_STRING { } ; +peer_mtu: TOK_UINT { + if ($1 < 576 || $1 > 65535) { + fastd_config_error(&@$, state, "invalid MTU"); + YYERROR; + } + + state->peer->mtu = $1; + } + ; peer_include: TOK_STRING { if (!fastd_config_read($1->str, state->peer_group, state->peer, state->depth)) YYERROR; -- cgit v1.2.3