Ticket #472 (closed Bug report: fixed)

Opened 10 years ago

Last modified 9 years ago

PATCH: Error parsing outgoing traffic in iptables_fw_counters_update()

Reported by: rgmarelli@… Owned by: gbastien
Priority: low Milestone: Gateway 1.1.5
Component: Gateway Version:
Keywords: Cc:

Description

Hi, it seems that there is a formatting error when parsing outgoing traffic in iptables_fw_counters_update(). Current line only updates the outgoing counter of the first client. Line 503 is:

rt = fscanf(output, "%*s %llu %*s %*s %*s %*s %*s %15[0-9.] %*s %*s %*s %*s %*s 0x%*u", &counter, ip);

but should be:

rc = fscanf(output, "%*s %lu %*s %*s %*s %*s %*s %15[0-9.] %*s %*s %*s 0x%*u", &counter, ip);

Regards,

Guido

Change History

Changed 10 years ago by networkfusion

  • milestone changed from Not yet assigned to a Milestone to Gateway 1.1.5

Changed 10 years ago by jean-philippe.menil@…

The workaround don't work.
This one work:
in fw_iptables.c line 536:
rt = fscanf(output, "%*s %llu %*s %*s %*s %*s %*s %15[0-9.] %*s %*s %*s %*s %*s 0x%*u", &counter, ip);
should be:
rt = fscanf(output, "%*s %llu %*s %*s %*s %*s %*s %15[0-9.] %*s %*s %*s %*s %*s %*s", &counter, ip);
Now all the counters are parsed correctly, and we don't have anymore the following message:
Messages: | Incoming or outgoing counter is missing; counters not updated. | User is now logged out.

Changed 9 years ago by benoitg

  • summary changed from Error parsing outgoing traffic in iptables_fw_counters_update() to PATCH: Error parsing outgoing traffic in iptables_fw_counters_update()

Changed 9 years ago by gbastien

  • owner set to gbastien
  • status changed from new to assigned

Changed 9 years ago by gbastien

  • status changed from assigned to closed
  • resolution set to fixed

Implemented patch by Jean-Philippe Menil

Note: See TracTickets for help on using tickets.