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

Also available in: Atom PDF