Project

General

Profile

Bug #9823

no l2tplink param in get_interface_info

Added by Viktor Gurov 10 days ago. Updated about 22 hours ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
PPP Interfaces
Target version:
-
Start date:
10/12/2019
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.5.0
Affected Architecture:

Description

For L2TP interfaces you can't see "Uptime" in interfaces widget due to function get_interface_info do not return link type [l2tplink]:

$ifdescrs = get_configured_interface_with_descr();

foreach ($ifdescrs as $ifdescr => $ifname) {
        $ifinfo = get_interface_info($ifdescr);
        print_r($ifinfo);
}

output:
(
    [hwif] => l2tp0
    [enable] => 1
    [if] => l2tp0
    [status] => up
    [macaddr] => 
    [mtu] => 1492
    [ipaddr] => 172.11.5.0
    [subnet] => 255.255.255.255
    [linklocal] => fe80::e0d:52ff:fe73:8300%l2tp0
    [ipaddrv6] => 
    [subnetv6] => 
    [inerrs] => 0
    [outerrs] => 0
    [collisions] => 0
    [inbytespass] => 2855
    [outbytespass] => 1367
    [inpktspass] => 13
    [outpktspass] => 18
    [inbytesblock] => 0
    [outbytesblock] => 0
    [inpktsblock] => 1
    [outpktsblock] => 0
    [inbytes] => 2855
    [outbytes] => 1367
    [inpkts] => 13
    [outpkts] => 18
)

not tested with PPTP or PPPoE links

2.5.0-DEVELOPMENT (amd64)
built on Fri Oct 11 18:53:28 EDT 2019
FreeBSD 12.0-RELEASE-p10

History

#1 Updated by Viktor Gurov 10 days ago

config.xml:

<opt3>
                        <descr><![CDATA[L2TP]]></descr>
                        <if>l2tp0</if>
                        <enable></enable>
                        <spoofmac></spoofmac>
</opt3>

<ppps>
                <ppp>
                        <ptpid>0</ptpid>
                        <type>l2tp</type>
                        <if>l2tp0</if>
                        <ports>vtnet1</ports>
                        <username><![CDATA[l2user1]]></username>
                        <password>MTIz</password>
                        <localip></localip>
                        <subnet>31</subnet>
                        <gateway>10.1.0.5</gateway>
                        <bandwidth></bandwidth>
                        <mtu></mtu>
                        <mru></mru>
                        <mrru></mrru>
                </ppp>
</ppps>

#2 Updated by Viktor Gurov 10 days ago

this is why changes in "Show PPP uptime on the Dashboard - Interfaces Widget" https://redmine.pfsense.org/issues/9426 don't show uptime for L2TP interface

#3 Updated by Viktor Gurov 3 days ago

it successfully creates [l2tplink] entry after you select L2TP in IPv4 Configuration Type field on interface configuration page

bug can be closed

#4 Updated by Jim Pingle about 22 hours ago

  • Status changed from New to Closed

Also available in: Atom PDF