Project

General

Profile

Actions

Bug #9823

closed

no l2tplink param in get_interface_info

Added by Viktor Gurov over 4 years ago. Updated over 4 years ago.

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

0%

Estimated time:
Plus Target Version:
Release Notes:
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

Actions #1

Updated by Viktor Gurov over 4 years 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>
Actions #2

Updated by Viktor Gurov over 4 years 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

Actions #3

Updated by Viktor Gurov over 4 years ago

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

bug can be closed

Actions #4

Updated by Jim Pingle over 4 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF