mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-13 04:22:58 +02:00
setup: Allow setting netmask to 255.255.255.255
Some hosters require that the subnet mask of the RED network is set to 255.255.255.255. This was not possible to save before. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -17,6 +17,7 @@ usr/lib/firewall/ipsec-block
|
||||
usr/lib/libssp.so.0
|
||||
usr/lib/libssp.so.0.0.0
|
||||
usr/local/bin/xt_geoip_update
|
||||
usr/sbin/setup
|
||||
var/ipfire/langs
|
||||
var/ipfire/general-functions.pl
|
||||
var/ipfire/graphs.pl
|
||||
|
||||
@@ -75,7 +75,8 @@ int changeaddress(struct keyvalue *kv, char *colour, int typeflag,
|
||||
int startstatictype = 0;
|
||||
int startdhcptype = 0;
|
||||
int startpppoetype = 0;
|
||||
|
||||
unsigned char buffer[sizeof(struct in_addr)];
|
||||
|
||||
/* Build some key strings. */
|
||||
sprintf(addressfield, "%s_ADDRESS", colour);
|
||||
sprintf(netmaskfield, "%s_NETMASK", colour);
|
||||
@@ -184,7 +185,7 @@ int changeaddress(struct keyvalue *kv, char *colour, int typeflag,
|
||||
strcat(message, "\n");
|
||||
error = 1;
|
||||
}
|
||||
if (inet_addr(netmaskresult) == INADDR_NONE)
|
||||
if (inet_pton(AF_INET, netmaskresult, &buffer) == 0)
|
||||
{
|
||||
strcat(message, _("Network mask"));
|
||||
strcat(message, "\n");
|
||||
|
||||
Reference in New Issue
Block a user