Ticket #4706 (closed defect: fixed)
Fresh install Zentyal 2.3 unable to create static gateway illegal name
| Reported by: | darren@… | Owned by: | jamor@… |
|---|---|---|---|
| Milestone: | 3.0 | Component: | network |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I installed Zentyal using a temporary connection with a dhcp wan. After relocating it to it's proper place with a static WAN I wasn't able to create a gateway. I tried to name the gateway skywire (previous name on the same box with Zentyal 2.2) but it fails. I tried naming it with 1 single character as a letter or number and it still failed. After performing another fresh install I used the initial configuration to create the static address and it named the gateway after the IP address of said gateway. Attempted to rename it failed.
Attachments
Change History
comment:2 Changed 11 months ago by darren@…
That message you wrote is basically the exact of the error: The valid gateways names can only be composed of lowercase ASCII english letters, digits and '-'
I didn't upload my zentyal.log file in this ticket because it's already in ticket #4705 let me know if you need other files or data.
Changed 11 months ago by darren@…
-
attachment
zentyal.tar.bz2
added
zentyal log after new network.pm from ticket 4705
comment:3 Changed 11 months ago by darren@…
Here is the exact error message I receive when doing a static gateway:
Invalid value for Gateway name: skywire. Gateways names can only be composed of lowercase ASCII english letters, digits and '-'
I attached a new zentyal.log
comment:4 Changed 10 months ago by commi1993@…
I have EXACT same problem.
Fresh 2.3 installation with all updates. DHCP was enabled, but Gateway-list is still empty.
If I try to add static gateway named test:
Invalid value for Gateway name test: Gateways names can only be comp.... and so on.
Zentyal-log only say:
====================================================
GatewayTable?.pm:565 EBox::Network::Model::GatewayTable::checkGwName - Invalid value for Gateway name: test.
comment:5 Changed 10 months ago by commi1993@…
Correction: If I save with enabled DHCP, if shows DHCP-Gateway.
If I try to add static Gateway in static-ip mode I get this error (same as if I try to add a gateway in DHCP-mode - basicly a Check-gWName Bug.).
comment:6 Changed 10 months ago by piotrek.zurek@…
This is a logic error in checkGWName sub.
In file /usr/share/perl5/EBox/Network/Model/GatewayTable.pm (near the end) ther is:
unless ($name =~ m/^[^a-z0-9\-]+$/) {
throw EBox::Exceptions::InvalidData(
data => __('Gateway name'),
value => $name,
advice => __(q{Gateways names can only be composed of lowercase ASCII english letters, digits and '-'}),
Regex says that it allows any char _not_ in 0-9a-z and '-' thus this sub allows creating any gateway whith a name not containing theese characters (ie. '.') which is true.
Just change 'unless' to 'if' and it will work as it's supposed to. Code maintainers please fix this in git.
Hello Darren,
The valid gateways names can only be composed of lowercase ASCII english letters, digits and '-'. So this should not be the problem.
I have re-checkde this and it works.
Maybe this is another problem?. Coudl you try again and paste there the exact error mesage and the /var/log/zentyal/zentya.log file?