No uplink detection for vtnet interfaces



  • For vtnet interfaces ( You can see it by running pfsense in bhyve ) no proper identification as uplink.:

    
    Valid interfaces are:
    
    vtnet0 00:a0:98:19:fb:03   (up) VirtIO Networking Adapter
    
    Do you want to set up VLANs first? 
    
    If you are not going to use VLANs, or only for optional interfaces, you should
    say no here and use the webConfigurator to configure VLANs later, if required.
    
    Do you want to set up VLANs now [y|n]? n
    
    If you do not know the names of your interfaces, you may choose to use
    auto-detection. In that case, disconnect all interfaces now before
    hitting 'a' to initiate auto detection.
    
    Enter the WAN interface name or 'a' for auto-detection: a
    
    Connect the WAN interface now and make sure that the link is up.
    Then press ENTER to continue.
    
    No link-up detected.
    
    Enter the WAN interface name or 'a' for auto-detection: ^CDec 25 17:11:58 init: /bin/sh on /etc/rc terminated abnormally, going to single user mode
    Enter full pathname of shell or RETURN for /bin/sh: 
    # /sbin/ifconfig -a
    vtnet0: flags=8943 <up,broadcast,running,promisc,simplex,multicast>metric 0 mtu 1500
            options=80028 <vlan_mtu,jumbo_mtu,linkstate>ether 00:a0:98:19:fb:03
            inet6 fe80::2a0:98ff:fe19:fb03%vtnet0 prefixlen 64 scopeid 0x1 
            nd6 options=21 <performnud,auto_linklocal>media: Ethernet 10Gbase-T <full-duplex>
            status: active</full-duplex></performnud,auto_linklocal></vlan_mtu,jumbo_mtu,linkstate></up,broadcast,running,promisc,simplex,multicast>
    

    Probably incorrect regex in function get_interface_list() where

    case "media":
                    $intlist = pfSense_interface_listget();
                    $ifconfig = "";
                    exec("/sbin/ifconfig -a", $ifconfig);
                    $regexp = '/(' . implode('|', $intlist) . '):\s/';
                    ...
    
    

    Since the output for vtnet has no (,) brackets.


Log in to reply