Netgate SG-1000 microFirewall

Author Topic: IPv6 lease files needed; Working on a patch for #7413  (Read 717 times)

0 Members and 1 Guest are viewing this topic.

Offline al

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +1/-0
    • View Profile
IPv6 lease files needed; Working on a patch for #7413
« on: June 27, 2017, 02:29:23 pm »
Hi all,

I'm working on a patch for #7413
( https://redmine.pfsense.org/issues/7413 - 'status_dhcpv6_leases.php: Some DHCPv6 leases are not displayed in the GUI' )
concerning different issues of parsing the DHCPv6 lease file.

I try to fix it once and for all - and hopefully in a more precise and readable way.
However I need some lease files to cover all the keywords used under different configurations.

Would anyone be able to supply me with lease files that contain some (or all) of the below keywords:

failover
starts
tstp
tsfp
atsfp

(below from binding state)
free
backup
released

next
hardware
client-hostname
uid



Thanks!

Offline al

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: IPv6 lease files needed; Working on a patch for #7413
« Reply #1 on: December 03, 2017, 03:10:53 pm »
I have created a patch and wrote about it here:
https://redmine.pfsense.org/issues/7413#change-35288

marjohh

  • Guest
Re: IPv6 lease files needed; Working on a patch for #7413
« Reply #2 on: December 04, 2017, 02:29:09 am »
Tried adding the patch using system patches and get Patch Fetch failed.

Offline al

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: IPv6 lease files needed; Working on a patch for #7413
« Reply #3 on: December 07, 2017, 03:24:44 pm »
Hi marjohn56,

I wait for feedback re. the patch - I have not sent an official pull request yet, but mentioned where my github repo is with the files:
https://github.com/al-right/pfSense-dhcpv6-gui-leases-patch

The reason is that there are many changes and the patch rather big, but if I get time this weekend I will
make a patch where I move most of the files into a sub directory of /usr/local/www/ and also make a smaller
amend to one of the files.

But thanks for your interest - I'll update this forum thread once there is news.

marjohh

  • Guest
Re: IPv6 lease files needed; Working on a patch for #7413
« Reply #4 on: December 07, 2017, 04:08:41 pm »
It's not a requirement to have issued a PR to use the pfSense patches system. As long as the commit you have issued is complete.

Offline virgiliomi

  • Sr. Member
  • ****
  • Posts: 563
  • Karma: +74/-4
    • View Profile
Re: IPv6 lease files needed; Working on a patch for #7413
« Reply #5 on: December 13, 2017, 09:49:39 am »
If there's some way to apply this through the System Patches package, I'd be happy to do so... but I don't see an actual patch file, commit ID, or whatever is needed to be able to apply it that way. I'm not one to go through and just replace files.

marjohh

  • Guest
Re: IPv6 lease files needed; Working on a patch for #7413
« Reply #6 on: December 13, 2017, 10:12:17 am »
It's not been done as a patch, all separate complete files. It looks interesting, but a pain if it's not a patch that can be added/removed at the click of a button.

I'll not have time today, but tomorrow I may have time to go through them and create a patch commit.


Offline al

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: IPv6 lease files needed; Working on a patch for #7413
« Reply #7 on: December 14, 2017, 02:22:43 pm »
Hi marjohn56 and virgiliomi,

I'll make the patch this weekend.
I have a couple of smaller amends that need to go in e.g.
with respect to the license in one of the files
and make a sub folder for all but the status lease file.
Patience - I promise I'll make it ;)

Offline al

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: IPv6 lease files needed; Working on a patch for #7413
« Reply #8 on: December 16, 2017, 07:37:12 pm »
Hi all,

I have made the PR and you can find it here:
https://github.com/pfsense/pfsense/pull/3892/commits/c56471a75ac8cb7c573280022575ffdf0a92cf09
I have also tested it via System / Patches.

Feel free to try it out and comment.

Thanks :)

Offline virgiliomi

  • Sr. Member
  • ****
  • Posts: 563
  • Karma: +74/-4
    • View Profile
Re: IPv6 lease files needed; Working on a patch for #7413
« Reply #9 on: December 16, 2017, 09:34:52 pm »
Looks to be working well! It went through my leases and showed all the hosts that I would expect it to. The comparison to the NDP table to show MAC address seems to work as well. Not that MAC address has much to do with DHCPv6 like it does with DHCPv4, but if paired with the OUI file (placed wherever NMAP places it), you can at least see who made the device or network adapter. :)

marjohh

  • Guest
Re: IPv6 lease files needed; Working on a patch for #7413
« Reply #10 on: December 17, 2017, 03:01:20 am »
Looking good here too.

Nice work.

Offline al

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +1/-0
    • View Profile
Re: IPv6 lease files needed; Working on a patch for #7413
« Reply #11 on: January 15, 2018, 03:21:52 pm »
Hi all,

I have updated the PR with a second patch.
https://github.com/pfsense/pfsense/pull/3892/commits/f95579a6c42ab6bce1a103b8277c0cee93302b16

There are among other things a couple of visual changes
which intention is to give a better overview, because the
space in the tables are limited. You might want to read
the commit log message for further details.

Applying the newest patch with System Patches
won't work.
I guess it is because of the files
that moved.

You will have to copy the files to their target
locations manually when testing.

Thanks :)