Modify

Ticket #3105 (closed defect: fixed)

Opened 22 months ago

Last modified 21 months ago

Error to save trafficshaping rules when i use network objects

Reported by: clebersleite@… Owned by: jamor@…
Milestone: 2.2 Component: trafficshaping
Severity: critical Keywords: network objects trafficshaping
Cc:

Description

The Zentyal is recording the wrong rules when trafficshaping network objects. Ex: I register a network object with the name: User and put the IP: 192.168.0.10 on members. In Trafficshaping and add a rule for the User object and saved on the internal interface. Analyzing the log (tail-f / var / log / zentyal.log), when the Zentyal run iptables command generates the following line:

/ sbin / iptables-t mangle-A SHAPER-EBOX-eth0-m mark - mark 0/0xFF00 - destination 192.168.0.10/32/32-p tcp-j MARK - set-mark 0x3D00

This rule creates an iptables error in stating that the network or host does not exist, just because it is putting Zentyal / 32 again in the IP object: 192.168.0.10/32/32 <<. The First / 32 I believe is placed by the objects when you choose the network mask, I put only the IP. This shows me that the first / 32 came from the following objects and put Trafficshaping alone. The error does not occur when I put the rule in the direct IP bandwidth control, but when I use this error appears under this error.

Attachments

Change History

comment:1 Changed 22 months ago by clebersleite@…

news?

comment:2 Changed 22 months ago by clebersleite@…

I believe the problem is in the file: / usr/share/perl5/EBox/TrafficShaping.pm to add the rule that mangle the script duplicates the netmask to object. In line 1480 I modified the value of $ memberMask to. IP wrote the script like this:

192.168.0.10/32/

Is almost correct, but I do not know where it adds the final slash should not be there.

comment:3 Changed 22 months ago by cperez@…

  • priority changed from highest to high
  • Status changed from new to assigned

Thanks for the report, I will take a look to this during this week, It seems you almost have the fix :)

comment:4 Changed 22 months ago by clebersleite@…

Apparently almost ;) Trafficshaping.pm the file, the value $ memberIP is written with the network mask, this makes the error happen. If you know where this value is created is only you remove the mask before sending network to Trafficshaping.pm forcing IPTABLES will create the right rule. This is my vision. Maybe you have the correct view :D

comment:5 Changed 22 months ago by clebersleite@…

Unfortunately I do not understand enough Perl to solve the problem. I need the solution until Friday. waiting for a return. Thanks for the help :D

comment:6 Changed 22 months ago by clebersleite@…

News ???

comment:7 Changed 22 months ago by jamor@…

  • Owner changed from cperez@… to jamor@…
  • Status changed from assigned to new

Hello clebersite,

I will lokk this isuee between today and tomorrow.

Take care,

Javier

comment:8 Changed 21 months ago by jamor@…

  • Status changed from new to assigned

comment:9 Changed 21 months ago by ejhernandez@…

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

(In [23004]) NN: Remove mask from CIDR members in EBox::Objects::Model::MemberTable::addresses when mask parameter is set to 1 closes #3105

comment:10 Changed 21 months ago by ejhernandez@…

Hi Cleber,

Try the r23004 changeset in your box to see if that fix your issue.

Thanks very much for your feedback here!

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.