Modify

Ticket #4706 (closed defect: fixed)

Opened 11 months ago

Last modified 10 months ago

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

zentyal.tar.bz2 Download (30.7 KB) - added by darren@… 11 months ago.
zentyal log after new network.pm from ticket 4705

Change History

comment:1 Changed 11 months ago by jamor@…

  • Status changed from new to accepted

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?

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@…

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.

comment:7 Changed 10 months ago by commi1993@…

As I can see, its fixed ( git-changeset 54cccae05edccc5a1d1bd18ba8e870877501f5f7 ). Thanks JACalvo :)

comment:8 Changed 10 months ago by jacalvo@…

  • Status changed from accepted to closed
  • Resolution set to fixed

this is fixed in the new zentyal-network 2.3.11 package, thanks for reporting!

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.