From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] location-functions.pl: Recognise XD / LOC_NETWORK_FLAG_DROP Date: Tue, 12 Oct 2021 12:30:29 +0100 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3674186161872648551==" List-Id: --===============3674186161872648551== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thank you. Do we want to make this is a more convenient option somewhere in the UI in th= e future? -Michael Reviewed-by: Michael Tremer > On 10 Oct 2021, at 18:13, Peter M=C3=BCller wr= ote: >=20 > This enables creating firewall rules using the special country code "XD" > for hostile networks safe to drop and ipinfo.cgi to display a meaningful > text for IP addresses having this flag set. >=20 > At the moment, the "LOC_NETWORK_FLAG_DROP" is not yet populated, but > will be in the future (as soon as libloc 0.9.9 is released and running > in production). >=20 > Signed-off-by: Peter M=C3=BCller > --- > config/cfgroot/location-functions.pl | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/config/cfgroot/location-functions.pl b/config/cfgroot/location= -functions.pl > index fb97eb589..4d44ce24d 100644 > --- a/config/cfgroot/location-functions.pl > +++ b/config/cfgroot/location-functions.pl > @@ -2,7 +2,7 @@ > ###########################################################################= #### > # = # > # IPFire.org - A linux based firewall = # > -# Copyright (C) 2007-2020 IPFire Team = # > +# Copyright (C) 2007-2021 IPFire Team = # > # = # > # This program is free software: you can redistribute it and/or modify = # > # it under the terms of the GNU General Public License as published by = # > @@ -29,6 +29,7 @@ my %not_iso_3166_location =3D ( > "A1" =3D> "Anonymous Proxy", > "A2" =3D> "Satellite Provider", > "A3" =3D> "Worldwide Anycast Instance", > + "XD" =3D> "Hostile networks safe to drop", > ); >=20 > # Hash which contains possible network flags and their mapped location code= s. > @@ -36,10 +37,11 @@ my %network_flags =3D ( > "LOC_NETWORK_FLAG_ANONYMOUS_PROXY" =3D> "A1", > "LOC_NETWORK_FLAG_SATELLITE_PROVIDER" =3D> "A2", > "LOC_NETWORK_FLAG_ANYCAST" =3D> "A3", > + "LOC_NETWORK_FLAG_DROP" =3D> "XD", > ); >=20 > # Array which contains special country codes. > -my @special_locations =3D ( "A1", "A2", "A3" ); > +my @special_locations =3D ( "A1", "A2", "A3", "XD" ); >=20 > # Directory where the libloc database and keyfile lives. > our $location_dir =3D "/var/lib/location/"; > --=20 > 2.26.2 --===============3674186161872648551==--