From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Marx To: development@lists.ipfire.org Subject: [PATCH] BUG10941: fix single ip-addresses when no subnet given Date: Fri, 16 Oct 2015 09:57:34 +0200 Message-ID: <1444982254-5340-1-git-send-email-alexander.marx@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5178030540476752321==" List-Id: --===============5178030540476752321== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Alexander Marx --- html/cgi-bin/routing.cgi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi index c460a74..3b5a2f7 100644 --- a/html/cgi-bin/routing.cgi +++ b/html/cgi-bin/routing.cgi @@ -118,6 +118,11 @@ if ($settings{'ACTION'} eq $Lang::tr{'toggle enable disa= ble'}) { } =20 if ($settings{'ACTION'} eq $Lang::tr{'add'}) { + + if (!&Network::check_prefix($settings{'IP'})){ + $settings{'IP'} .=3D '/32'; + } + # Convert subnet masks to CIDR notation. $settings{'IP'} =3D &General::iporsubtocidr($settings{'IP'}); =20 --=20 1.9.1 --===============5178030540476752321==--