Opened 5 years ago

Closed 5 years ago

#3959 closed defect (fixed)

Option 55 is incorrectly traced in DEBUG

Reported by: nicolas.chaigneau Owned by: marcin
Priority: low Milestone: Kea0.9.2
Component: Unclassified Version: 0.9.2-beta
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Low
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 1 Internal?: no

Description

When in DEBUG mode, option 55 is shown in the log as (copy/paste of a real test):

2015-07-21 14:35:17.599 DEBUG [kea-dhcp4.packets/17362] DHCP4_QUERY_DATA [hwtype=1 44:48:42:00:01:01], cid=[no info], tid=0x1, packet details: local_address=10.163.216.236:67, remote_adress=10.163.216.249:67, msg_type=DHCPDISCOVER (1), transid=0x1,
options:

type=053, len=001: 1 (uint8)
type=055, len=006: (uint8) (uint8) (uint8) (uint8) w(uint8) ▒(uint8)
type=057, len=002: 1500 (uint16)

What I did sent was:

0x 37 06 01 03 06 0f 77 fc

The 6 uint8 of option 55 are not properly traced.
The two other options are correct.

Note: this has no impact on the DHCP server behavior, only the trace is incorrect.

Subtickets

Change History (8)

comment:1 follow-up: Changed 5 years ago by fdupont

There were at least 2 tickets addressing this (int8 or uint8 values must be cast to int or unsigned to be correctly displayed). What is the version of the code which gave the log?

comment:2 in reply to: ↑ 1 ; follow-up: Changed 5 years ago by nicolas.chaigneau

Replying to fdupont:

There were at least 2 tickets addressing this (int8 or uint8 values must be cast to int or unsigned to be correctly displayed). What is the version of the code which gave the log?

This was with Kea 0.9.2-beta.

Sorry if the ticket already exists. Unfortunately I'm not aware of all the tickets :/

comment:3 in reply to: ↑ 2 Changed 5 years ago by fdupont

Replying to nicolas.chaigneau:

Replying to fdupont:

There were at least 2 tickets addressing this (int8 or uint8 values must be cast to int or unsigned to be correctly displayed). What is the version of the code which gave the log?

This was with Kea 0.9.2-beta.

=> so either a ticket was not yet applied or it is another occurrence of the same issue.

Sorry if the ticket already exists. Unfortunately I'm not aware of all the tickets :/

=> it was just to win some time: most of us are at the IETF meeting...

Last edited 5 years ago by fdupont (previous) (diff)

comment:4 Changed 5 years ago by marcin

  • Owner set to marcin
  • Status changed from new to accepted

comment:5 Changed 5 years ago by marcin

  • Milestone changed from Kea-proposed to Kea0.9.2
  • Owner changed from marcin to UnAssigned
  • Status changed from accepted to reviewing

Fix applied in libdhcp and new unit test provided.

Proposed ChangeLog entry:

XXX.	[bug]		marcin
	Fixed textual representation of the options containing an array
	of 1 byte long unsigned numbers.
	(Trac #3959, git abcd)

comment:6 Changed 5 years ago by tmark

  • Owner changed from UnAssigned to tmark

comment:7 Changed 5 years ago by tmark

  • Owner changed from tmark to marcin
  • Total Hours changed from 0 to 1

Changes are fine, please merge them.

You might wish to describe the difference in behavior more explicitly in the !Changelog, i.e. "values are now displayed in as decimal numbers rather than ASCII characters."

comment:8 Changed 5 years ago by marcin

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

I merged the changes. Though, I decided to not extend the changelog entry as I think it goes too much into the details. The most important thing is that the output was broken, now it is correct.

Merge commit 9045fd9d6d282184cce10a622c0108abab029d5b

Note: See TracTickets for help on using tickets.