The interfaces page of a VMG4005-B50A showed wan, lan and two Wi-Fi radios, all up at 1000 Mbit/s, with 192.168.1.1/24 on the LAN. The gateway is a VDSL bridge without Wi-Fi, and its LAN is a /29.
Cause.get_interfaces returned a fixed set, and get_interfaces_ip hard-coded /24. Both read WanIp, LanIp and MacAddress from getBasicInformation, which this firmware does not send. The LAN address was therefore just the hostname the driver connected to.
Fix. Both now read the DAL's cardpage_status (a GET answers sealed, like a PUT, and is decrypted):
WanLanInfo gives the IP interfaces by their own names (br0, atm0.1, ptm0.2), with status, MAC and the IPv4 addresses with their netmask.
LanInfo gives the Ethernet ports (eth1, "LAN1"), with status, MAC and speed.
A speed or MTU the gateway does not report is 0 (unknown).
IPv6 is not read yet: no gateway seen so far had it on.
Checked read-only against the live gateway: br0 192.168.1.1/29, eth1 1000 Mbit/s, atm0.1 and ptm0.2 down, no Wi-Fi.
The tests that pinned the invented interfaces are gone. tests/test_interfaces.py uses the gateway's real answer, cut down to the fields read.
The interfaces page of a VMG4005-B50A showed `wan`, `lan` and two Wi-Fi radios, all up at 1000 Mbit/s, with `192.168.1.1/24` on the LAN. The gateway is a VDSL bridge without Wi-Fi, and its LAN is a /29.
**Cause.** `get_interfaces` returned a fixed set, and `get_interfaces_ip` hard-coded /24. Both read `WanIp`, `LanIp` and `MacAddress` from `getBasicInformation`, which this firmware does not send. The LAN address was therefore just the hostname the driver connected to.
**Fix.** Both now read the DAL's `cardpage_status` (a GET answers sealed, like a PUT, and is decrypted):
- `WanLanInfo` gives the IP interfaces by their own names (`br0`, `atm0.1`, `ptm0.2`), with status, MAC and the IPv4 addresses with their netmask.
- `LanInfo` gives the Ethernet ports (`eth1`, "LAN1"), with status, MAC and speed.
- A speed or MTU the gateway does not report is 0 (unknown).
- IPv6 is not read yet: no gateway seen so far had it on.
Checked read-only against the live gateway: br0 192.168.1.1/29, eth1 1000 Mbit/s, atm0.1 and ptm0.2 down, no Wi-Fi.
The tests that pinned the invented interfaces are gone. `tests/test_interfaces.py` uses the gateway's real answer, cut down to the fields read.
get_interfaces reported a fixed set: wan, lan and two Wi-Fi radios, all
up at 1000 Mbit/s, the LAN with the WAN's MAC. get_interfaces_ip gave
both a /24, the LAN's address being the hostname the driver connected
to. getBasicInformation carries none of WanIp, LanIp or MacAddress on a
VMG4005-B50A, a VDSL bridge without Wi-Fi whose LAN is a /29, and the
gateway showed all of the invented values.
Both now read the DAL's cardpage_status, which a GET answers sealed like
a PUT: the IP interfaces in WanLanInfo (br0, atm0.1, ptm0.2) with their
status, MAC and netmask, the Ethernet ports in LanInfo (eth1) with their
speed. A speed or MTU the gateway does not report is 0, unknown. IPv6
addresses are not read yet: no gateway seen so far had IPv6 on.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The interfaces page of a VMG4005-B50A showed
wan,lanand two Wi-Fi radios, all up at 1000 Mbit/s, with192.168.1.1/24on the LAN. The gateway is a VDSL bridge without Wi-Fi, and its LAN is a /29.Cause.
get_interfacesreturned a fixed set, andget_interfaces_iphard-coded /24. Both readWanIp,LanIpandMacAddressfromgetBasicInformation, which this firmware does not send. The LAN address was therefore just the hostname the driver connected to.Fix. Both now read the DAL's
cardpage_status(a GET answers sealed, like a PUT, and is decrypted):WanLanInfogives the IP interfaces by their own names (br0,atm0.1,ptm0.2), with status, MAC and the IPv4 addresses with their netmask.LanInfogives the Ethernet ports (eth1, "LAN1"), with status, MAC and speed.Checked read-only against the live gateway: br0 192.168.1.1/29, eth1 1000 Mbit/s, atm0.1 and ptm0.2 down, no Wi-Fi.
The tests that pinned the invented interfaces are gone.
tests/test_interfaces.pyuses the gateway's real answer, cut down to the fields read.