From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: network@lists.ipfire.org Subject: Re: [PATCH 3/4] util: add function mtu_is_valid Date: Sat, 03 Jun 2017 14:04:39 +0100 Message-ID: <1496495079.23621.34.camel@ipfire.org> In-Reply-To: <1496489110-10134-3-git-send-email-jonatan.schlag@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7559539644459701636==" List-Id: --===============7559539644459701636== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Hello, could you please resend this patch with indentation fixed? All other functions are indented by one tab where this one is not. On Sat, 2017-06-03 at 13:25 +0200, Jonatan Schlag wrote: > This function checks if an mtu is valid for a given IP protocol. > > Signed-off-by: Jonatan Schlag > --- >  src/functions/functions.util | 19 +++++++++++++++++++ >  1 file changed, 19 insertions(+) > > diff --git a/src/functions/functions.util b/src/functions/functions.util > index 4b6f956..98ad9d4 100644 > --- a/src/functions/functions.util > +++ b/src/functions/functions.util > @@ -321,6 +321,25 @@ isipaddress() { >   ip_is_valid ${addr} >  } >   > +mtu_is_valid() { > + > +local proto=${1} > +local mtu=${2} The empty line after the function name is unnecessary. > + > +case ${proto} in > + ipv4) > + [ ${mtu} -ge 576 ] && [ ${mtu} -le 9000 ] > + ;; > + ipv6) > + [ ${mtu} -ge 1280 ] && [ ${mtu} -le 9000 ] > + ;; > + *) > + error "${proto} is not a valid proto" > + return ${EXIT_ERROR} > + ;; > +esac > +} > + >  backtrace() { >   local start=1 > Best, -Michael  --===============7559539644459701636== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjIKCmlRSWNCQUFC Q2dBR0JRSlpNclBuQUFvSkVJQjU4UDl2a0FrSDhNOFAvaWZ4alZYMVdweCtKTEZlbzNkKzRBaEgK ZG95em5pSFFLSDU3Rk96WitIY21FNG13aktq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