OPNsense Forum

Archive => 18.7 Legacy Series => Topic started by: keropiko on December 09, 2018, 10:56:26 am

Title: PHP Warning errors
Post by: keropiko on December 09, 2018, 10:56:26 am
Hi to all,

i recently decided to pass over to OPNsense from pfSense and see if i can replace it with.
I created my OPNsense VM with Virtio interfaces on proxmox, installed and set up everything.
After the setup, everything run smooth so i run the firmware update to the latest pachages.
The problem is that after the update, after every reboot i get the following error, which was not present at the initial installation:

[09-Dec-2018 11:44:56 Europe/Athens] PHP Warning:  in_array() expects parameter 2 to be array, null given in /usr/local/etc/inc/interfaces.lib.inc on line 359
[09-Dec-2018 11:44:56 Europe/Athens] PHP Warning:  in_array() expects parameter 2 to be array, null given in /usr/local/etc/inc/interfaces.lib.inc on line 359
[09-Dec-2018 11:44:56 Europe/Athens] PHP Warning:  in_array() expects parameter 2 to be array, null given in /usr/local/etc/inc/interfaces.lib.inc on line 360
[09-Dec-2018 11:44:56 Europe/Athens] PHP Warning:  in_array() expects parameter 2 to be array, null given in /usr/local/etc/inc/interfaces.lib.inc on line 360
[09-Dec-2018 11:44:56 Europe/Athens] PHP Warning:  in_array() expects parameter 2 to be array, null given in /usr/local/etc/inc/interfaces.lib.inc on line 361
[09-Dec-2018 11:44:56 Europe/Athens] PHP Warning:  in_array() expects parameter 2 to be array, null given in /usr/local/etc/inc/interfaces.lib.inc on line 361
[09-Dec-2018 11:44:56 Europe/Athens] PHP Warning:  in_array() expects parameter 2 to be array, null given in /usr/local/etc/inc/interfaces.lib.inc on line 362

I think it must be related to the 7 virtio adapters i have?

All hardware offload,TSO ecc. are disabled as per default.

Thank you.
Title: Re: PHP Warning errors
Post by: fabian on December 09, 2018, 11:48:00 am
the root cause seems to be that the function legacy_interfaces_details in src/etc/inc/interfaces.lib.inc:208 does not set the 'options' parameter.

Can you post the output of "ifconfig -m" to check if it is missing?
Title: Re: PHP Warning errors
Post by: keropiko on December 09, 2018, 12:05:53 pm
Hi Fabian, thanks fo the reply.

Code: [Select]
vtnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=6c00b8<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        capabilities=7d07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWFILTER,VLAN_HWTSO,LINKSTATE,NETMAP,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 5e:ce:b4:ee:95:99
        hwaddr 5e:ce:b4:ee:95:99
        inet 172.16.54.1 netmask 0xffffff00 broadcast 172.16.54.255
        inet6 xxxx:xxx:xxx:xxxx:xxxx:xxxx:xxxx:xxxx prefixlen 64
        inet6 fe80::1:1%vtnet0 prefixlen 64 scopeid 0x1
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
        supported media:
                media 10Gbase-T mediaopt full-duplex
vtnet1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=6c00b8<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        capabilities=7d07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWFILTER,VLAN_HWTSO,LINKSTATE,NETMAP,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 4e:9b:b3:fe:d4:72
        hwaddr 4e:9b:b3:fe:d4:72
        inet 192.168.100.1 netmask 0xffffff00 broadcast 192.168.100.255
        inet6 fe80::4c9b:b3ff:fefe:d472%vtnet1 prefixlen 64 scopeid 0x2
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
        supported media:
                media 10Gbase-T mediaopt full-duplex
vtnet2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=6c00b8<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        capabilities=7d07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWFILTER,VLAN_HWTSO,LINKSTATE,NETMAP,RXCSUM_IPV6,TXCSUM_IPV6>
        ether a6:32:76:a7:2d:fb
        hwaddr a6:32:76:a7:2d:fb
        inet 10.10.90.1 netmask 0xffffff00 broadcast 10.10.90.255
        inet6 fe80::a432:76ff:fea7:2dfb%vtnet2 prefixlen 64 scopeid 0x3
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
        supported media:
                media 10Gbase-T mediaopt full-duplex
vtnet3: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=6c00b8<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        capabilities=7d07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWFILTER,VLAN_HWTSO,LINKSTATE,NETMAP,RXCSUM_IPV6,TXCSUM_IPV6>
        ether e6:f5:64:b8:56:46
        hwaddr e6:f5:64:b8:56:46
        inet 10.99.99.1 netmask 0xffffff00 broadcast 10.99.99.255
        inet6 fe80::e4f5:64ff:feb8:5646%vtnet3 prefixlen 64 scopeid 0x4
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
        supported media:
                media 10Gbase-T mediaopt full-duplex
vtnet4: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=6c00b8<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        capabilities=7d07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWFILTER,VLAN_HWTSO,LINKSTATE,NETMAP,RXCSUM_IPV6,TXCSUM_IPV6>
        ether ae:02:2a:59:25:1b
        hwaddr ae:02:2a:59:25:1b
        inet6 fe80::ac02:2aff:fe59:251b%vtnet4 prefixlen 64 scopeid 0x5
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
        supported media:
                media 10Gbase-T mediaopt full-duplex
vtnet5: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=6c00b8<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        capabilities=7d07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWFILTER,VLAN_HWTSO,LINKSTATE,NETMAP,RXCSUM_IPV6,TXCSUM_IPV6>
        ether be:55:dd:66:56:9d
        hwaddr be:55:dd:66:56:9d
        inet 192.168.1.251 netmask 0xffffff00 broadcast 192.168.1.255
        inet6 fe80::bc55:ddff:fe66:569d%vtnet5 prefixlen 64 scopeid 0x6
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
        supported media:
                media 10Gbase-T mediaopt full-duplex
vtnet6: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=6c00b8<VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        capabilities=7d07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWFILTER,VLAN_HWTSO,LINKSTATE,NETMAP,RXCSUM_IPV6,TXCSUM_IPV6>
        ether ae:90:71:3e:93:d8
        hwaddr ae:90:71:3e:93:d8
        inet 192.168.2.254 netmask 0xffffff00 broadcast 192.168.2.255
        inet6 fe80::ac90:71ff:fe3e:93d8%vtnet6 prefixlen 64 scopeid 0x7
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
        supported media:
                media 10Gbase-T mediaopt full-duplex
enc0: flags=0<> metric 0 mtu 1536
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        groups: enc
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        capabilities=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        groups: lo
pflog0: flags=100<PROMISC> metric 0 mtu 33160
        groups: pflog
pfsync0: flags=0<> metric 0 mtu 1500
        groups: pfsync
        syncpeer: 0.0.0.0 maxupd: 128 defer: off
ovpnc1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        capabilities=80000<LINKSTATE>
        inet6 fe80::2cc4:7052:bd58:8f00%ovpnc1 prefixlen 64 scopeid 0xc
        inet 10.8.1.2 --> 10.8.1.1  netmask 0xffffff00
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        groups: tun openvpn
        Opened by PID 76203
pppoe0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> metric 0 mtu 1492
        inet6 xxxx::xxxx:xxxx:xxxx:xxxx%pppoe0 prefixlen 64 scopeid 0xd
        inet6 fe80::4c9b:b3ff:fefe:d472%pppoe0 prefixlen 64 scopeid 0xd
        inet xx.xx.xx.xx --> xx.xxx.xx.xxx  netmask 0xffffffff
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
Title: Re: PHP Warning errors
Post by: fabian on December 09, 2018, 06:11:43 pm
The routine successfully reads your output so it must be something that happens on boot.

Maybe it is something that isn't yet ready when you start OPNsense...
Title: Re: PHP Warning errors
Post by: franco on December 10, 2018, 09:04:33 pm
I created a ticket... better to remove the parsing errors: https://github.com/opnsense/core/issues/3035