Bug #275
closedInvalid ifconfig attempts on serial device
0%
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'
Updated by Marcus Brown almost 15 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).
Updated by Marcus Brown almost 15 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. . .