Project

General

Profile

Bug #4649

Add static mapping for this mac address button links to wrong page

Added by David Gessel about 4 years ago. Updated about 4 years ago.

Status:
Not a Bug
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
-
Start date:
04/22/2015
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.2.2
Affected Architecture:

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.

Status-DHCP-Leases-Add.png (88.6 KB) Status-DHCP-Leases-Add.png Phillip Davis, 04/22/2015 08:14 PM
01_shortURL.PNG (133 KB) 01_shortURL.PNG Incomplete URL David Gessel, 04/23/2015 06:59 AM
02_establishing_connection.PNG (125 KB) 02_establishing_connection.PNG establishing connection David Gessel, 04/23/2015 06:59 AM
03_destination.PNG (90.5 KB) 03_destination.PNG destination David Gessel, 04/23/2015 06:59 AM

History

#1 Updated by Phillip Davis about 4 years ago

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.

#2 Updated by David Gessel about 4 years ago

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.

#3 Updated by Chris Buechler about 4 years ago

  • 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.

#4 Updated by David Gessel about 4 years ago

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:
Incomplete URL

02 - the browser tries to go that URL, which....
establishing connection

03 - fails and defaults to services_dhcp.php
destination

#5 Updated by Phillip Davis about 4 years ago

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.

#6 Updated by David Gessel about 4 years ago

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.

#7 Updated by Phillip Davis about 4 years ago

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