Bug #12867
closedIn some cases, incorrect subnet settings prevent static routes from being set correctly after a system restart.
0%
Description
After a simple analysis, it seems that the problem is in the following code range. I suspect it is pfSense_interface_setaddress, because I used the subnet result of /30 to check ifconfig and found that /32 was allocated.
[22.01-RELEASE][root@pfSense.home.arpa]/var/log: ifconfig igb2
igb2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: IPLCWan
options=e527bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
ether 00:25:90:ba:0f:f2
inet6 fe80::225:90ff:feba:ff2%igb2 prefixlen 64 scopeid 0x3
inet XXX.XXX.XXX.XXX netmask 0xffffffff broadcast XXX.XXX.XXX.XXX
inet XXX.XXX.XXX.XXX netmask 0xfffffffc broadcast XXX.XXX.XXX.XXX
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
[22.01-RELEASE][root@pfSense.home.arpa]/var/log: ifconfig igb2 inet XXX.XXX.XXX.XXX/30
[22.01-RELEASE][root@pfSense.home.arpa]/var/log: ifconfig igb2
igb2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
description: IPLCWan
options=e527bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,WOL_MAGIC,VLAN_HWFILTER,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
ether 00:25:90:ba:0f:f2
inet6 fe80::225:90ff:feba:ff2%igb2 prefixlen 64 scopeid 0x3
inet XXX.XXX.XXX.XXX netmask 0xfffffffc broadcast XXX.XXX.XXX.XXX
inet XXX.XXX.XXX.XXX netmask 0xfffffffc broadcast XXX.XXX.XXX.XXX
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
switch ($wancfg['ipaddr']) {
case 'dhcp':
interface_dhcp_configure($interface);
break;
case 'pppoe':
case 'l2tp':
case 'pptp':
case 'ppp':
interface_ppps_configure($interface);
break;
default:
/* XXX: Kludge for now related to #3280 */
if (!in_array($tunnelif, array("gif", "gre", "ovp", "ips"))) {
if (is_ipaddrv4($wancfg['ipaddr']) && $wancfg['subnet'] <> "") {
pfSense_interface_setaddress($realif, "{$wancfg['ipaddr']}/{$wancfg['subnet']}");
}
}
break;
}
Files