Project

General

Profile

Actions

Bug #275

closed

Invalid ifconfig attempts on serial device

Added by Chris Buechler over 14 years ago. Updated about 14 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Interfaces
Target version:
Start date:
01/04/2010
Due date:
% Done:

0%

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

Description

When using a PPP connection, at least two ifconfig commands are attempted on the serial device where they should be on the tun interface.

php: /interfaces.php: The command '/usr/sbin/arp -d -i cuaU0.0 -a' returned exit code '1', the output was 'arp: interface cuaU0.0 does not exist'

php: /interfaces_assign.php: The command '/sbin/ifconfig cuaU0.1 -ipfwfilter' returned exit code '1', the output was 'ifconfig: interface cuaU0.1 does not exist'

Actions #1

Updated by Marcus Brown over 14 years ago

Check the get_interface_info function in pfsense-utils.inc. It reports the same device for hwif and if. I always felt this should be cleaned up so that it's more intuitive. I tried to change it in the code but it breaks things that occur later in the same function. If ppp support were better integrated into this function it might fix this issue. (but I'm not sure).

Actions #2

Updated by Marcus Brown over 14 years ago

I dug around a little bit more. I think these are occurring because when the link is down, the function get_real_interface returns the serial device which is the only thing associated with the "WAN" interface when the link is down.
In /etc/inc/interfaces.inc there is a "interface_bring_down" function which has the code:

$realif = get_real_interface($interface);
mwexec("/usr/sbin/arp -d -i {$realif} -a");

If you make it look like this it seems to correct the issue with the "arp" command. I didn't do much testing, but this is the only reference I could find to this command with grep.

$realif = get_real_interface($interface);
if(does_interface_exist($realif)){
mwexec("/usr/sbin/arp -d -i {$realif} -a");
}

I could only find reference to the ifconfig command in /etc/inc/captiveportal.inc . . .

mwexec("/sbin/ifconfig {$listrealif} -ipfwfilter");

Not sure about that. . .

Actions #3

Updated by Ermal Luçi about 14 years ago

  • Status changed from New to Feedback

Patch committed.

Actions #4

Updated by Chris Buechler about 14 years ago

  • Status changed from Feedback to Resolved

fixed

Actions

Also available in: Atom PDF