Project

General

Profile

Actions

Bug #6852

closed

Commit 8f86722 breaks DHCPv6 leases status page

Added by Nick Venenga over 7 years ago. Updated over 4 years ago.

Status:
Duplicate
Priority:
Normal
Category:
DHCP (IPv6)
Target version:
-
Start date:
10/11/2016
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
Affected Architecture:

Description

The commit in question changed the awk pattern used when getting DHCPv6 information from the lease file. The pattern was changed:

From: $splitpattern = "'BEGIN { RS=\"}\";} {for (i=1; i<=NF; i++) printf \"%s \", \$i; printf \"}\\n\";}'";
To: $splitpattern = "'{printf $0}; $0 ~ /^\}/ {printf \"\\n\"}'";

Commit in question: https://github.com/pfsense/pfsense/commit/8f867225f4c2d3e61863f8d87d4ddb4143d5dda6#diff-b48bdab1db8f78638fbf6c7d98a01172

See images below. Leases file is attached for reference (I don't really care about exposed information)


Files

DHCPv6_Error.PNG (19 KB) DHCPv6_Error.PNG Nick Venenga, 10/11/2016 08:55 PM
DHCPv6_Correct.PNG (37.9 KB) DHCPv6_Correct.PNG Nick Venenga, 10/11/2016 08:55 PM
dhcpd6.leases (5.52 KB) dhcpd6.leases Nick Venenga, 10/11/2016 08:55 PM
dhcpd6.leases (3.08 KB) dhcpd6.leases Michael Kellogg, 12/17/2016 06:15 AM
dhcpd6.leases~ (5.02 KB) dhcpd6.leases~ Michael Kellogg, 12/17/2016 06:15 AM
Actions #1

Updated by Nick Venenga over 7 years ago

Affected version 2.3.2 (bug introduced in 2.3.2)

Actions #2

Updated by Nick Venenga over 7 years ago

Also see #6543

Actions #3

Updated by Jim Thompson over 7 years ago

  • Category set to DHCP (IPv6)
  • Assignee set to Renato Botelho
Actions #4

Updated by Brenton Rothchild over 7 years ago

This also just happened to me. There is more info when analyzing the stderr output from awk, or running the sed/awk command manually against the dhcpd6.leases file. For example:

awk: weird printf conversion %\000!\000\001\000\001\023\306\276\177\000\031\333\366\350\024" {
 input record number 1, file 
 source line number 1
awk: not enough args in printf(ia-na "\220%\000!\000\001\000\001\023\306\276\177\000\031\333\366\350\024" {)
 input record number 1, file 
 source line number 1

I'm not sure of the original intent of #6543, but it appears by using the print function instead of printf in the first part of the awk expression, this corrects the issue with "weird printf conversion". However, the awk command still wouldn't join leases into a single line for me.

As a suggestion, it appears the issue in this case is the % must be escaped before the awk printf (which is necessary to remove the trailing newline and join the lines into one). Adding an additional sed command of s,%,%%,g; seems to help in this case and I can view the content of the attached leases file in the status page.

Actions #5

Updated by Jim Pingle over 7 years ago

If it breaks for you, please include the relevant portions of dhcpd6.leases that break it, or the entire file if possible. It works for many people, but given the wide variety of systems out there, plenty of edge cases exist where the format of the leases file might not parse as expected, so having the source data to fix the parser is crucial.

Actions #6

Updated by Michael Kellogg over 7 years ago

only ipv6 that i get to show up is static mappings so I attached requested file currently on 2.3.3-DEVELOPMENT (amd64)
built on Fri Dec 16 18:14:16 CST 2016 so I attached requested file

Actions #7

Updated by Michael Kellogg over 7 years ago

were the files I uploaded any help or is something more needed?

Actions #8

Updated by Michael Kellogg about 7 years ago

does reverting this commit in 2.3.3 with a patch (i dont know how) fix this its really annoying not having this populated

Actions #9

Updated by Michael Kellogg about 7 years ago

This is a regression

Actions #10

Updated by Michael Kellogg about 7 years ago

upgraded hardware due to c2000 restored config and this now works so guess somethin in my dhcp6 leases file had a problem maybe just delete file and see if it fixes problem

Actions #11

Updated by Kill Bill over 6 years ago

Duplicate of Bug #7413

Actions #12

Updated by Jim Pingle over 4 years ago

  • Status changed from New to Duplicate
Actions

Also available in: Atom PDF