Bug #4649
closed
Add static mapping for this mac address button links to wrong page
Added by David Gessel over 9 years ago.
Updated over 9 years ago.
Description
The add static mapping for this mac address button used to take one to the static mapping entry page at /services_dhcp_edit.php?if=lan with the mac pre-filled. Very convenient.
now the button takes you to /services_dhcp.php . Not as convenient.
Files
It works fine on my 2.2.2 systems. I have attached a screen shot of Status->DHCP Leases while hovering over the button. The associated URL can be seen.
well that is very weird. I opened chrome and tested, it worked correctly. I switched to a firefox tab, selected DHCP leases and got the same artifact (incorrect operation) reloaded, and it worked correctly. I restarted firefox between the first and second test.
Definitely cannot be reliably replicated even on my system. I'll make sure to screen grab the hover if I see it again.
- Status changed from New to Not a Bug
services_dhcp.php doesn't exist in that file at all. Don't see how that would be possible.
Definitely report back if you find a means of replicating.
A little testing - I can get it to happen pretty reliably in both Chrome and Firefox. What I noticed was that the destination URL as revealed by text below fills out over the course of a few hundred msec and isn't quite complete when you first hover. If you click before it is fully formed, it takes you to an incomplete URL and that defaults to
https://10.0.251.3/services_dhcp.php
01 - Click before the URL is fully worked out:
02 - the browser tries to go that URL, which....
03 - fails and defaults to services_dhcp.php
Have you defined DHCP pools?
Do the effected entries have DHCP addresses issued from the pool(s)?
I can see that the code in status_dhcp_leases.php that calculates which interface each IP address comes from, is not going to work with IP addresses that have come from a pool.
Yes, they are all fine. If I hover over the plus button for more than a few MSEC, the URL fills out completely and then I get the correct and expected result.
I suspect this is ultimately neither particularly important nor particularly easy to fix. I have a pretty large DHCP pool attached to a tiny little logic supply fanless computer. I doubt there is enough delay in a more appropriately balanced system to permit catching the link before it is fully constructed. It is more likely to be merely interesting that it is possible to do so than a real bug.
So I don't know what your bug is - that is really weird if the link has "if=" with no interface, but then the interface value comes after a while - e.g. "if=lan".
There is a bug if you have multiple DHCP pools. The interface corresponding to IP addresses in the extra pools are not resolved back to the interface they are in, and that makes it go wrong in the way it is in your screen shots.
This should fix it:
https://github.com/pfsense/pfsense/pull/1631
Also available in: Atom
PDF