Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interfaces shows wrong wlan0 state #2334

Open
denk-mal opened this issue Mar 5, 2025 · 11 comments
Open

Interfaces shows wrong wlan0 state #2334

denk-mal opened this issue Mar 5, 2025 · 11 comments

Comments

@denk-mal
Copy link

denk-mal commented Mar 5, 2025

Versions

  • Core version is v6.0.4 (Latest: v6.0.4)
  • Web version is v6.0.1 (Latest: v6.0.1)
  • FTL version is v6.0.3 (Latest: v6.0.3)

Platform

  • OS and version: Debian 12 (bookworm)
  • Platform: std x64 PC

Expected behavior

State of wlan0 should be shown as down but is shown as up

Actual behavior / bug

Image

instead of

ip addr show wlan0
wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 1c:c1:0c:xx:xx:xx brd ff:ff:ff:ff:ff:ff

Steps to reproduce

Steps to reproduce the behavior:

  1. deactivate wlan0
  2. Go to Tools -> Interfaces
  3. show status of wlan0 on console ip addr show wlan0
  4. See error
@yubiuser yubiuser transferred this issue from pi-hole/web Mar 5, 2025
@DL6ER
Copy link
Member

DL6ER commented Mar 5, 2025

What is the wlan0 related output of

pihole api network/interfaces

?

Feel free to replace MAC/IP address information with, e.g., XX. Please just make sure it is clear what you obfuscated.

@denk-mal
Copy link
Author

denk-mal commented Mar 5, 2025

{
  "name": "wlan0",
  "speed": null,
  "type": "ether",
  "flags": [
    "broadcast",
    "multicast"
  ],
  "state": "down",
  "carrier": true,
  "proto_down": false,
  "address": "01:23:45:67:89:ab",
  "broadcast": "ff:ff:ff:ff:ff:ff",
  "perm_address": "01:23:45:67:89:ab",
  "stats": {
    "rx_bytes": {
      "value": 0,
      "unit": ""
    },
    "tx_bytes": {
      "value": 0,
      "unit": ""
    },
    "bits": 64
  }
},

@yubiuser
Copy link
Member

yubiuser commented Mar 5, 2025

@denk-mal
Copy link
Author

denk-mal commented Mar 5, 2025

I belive there is a little bit more to do because interface.carrier is a boolean (true/false) while interface.state is a string ("up"/"down")
EDIT: ...and lo has state 'UNKNOWN'

@DL6ER
Copy link
Member

DL6ER commented Mar 6, 2025

Please try again on branch development:

sudo pihole checkout web development

@denk-mal
Copy link
Author

denk-mal commented Mar 6, 2025

wlan0 is marked correcly as 'down' now - in green (docker0 is marked as 'down' in red). Vice versa would be better IMHO but this is a design thing and up to you.

@DL6ER
Copy link
Member

DL6ER commented Mar 6, 2025

wlan0 state is "down" but carrier is true -> hence green. It is not Pi-hole's "fault" that a disconnected WiFi module is advertised with carrier = true I'd say here :-)

docker0 state is "down" and carrier is false -> red color. Does it mean you have no docker container running right now?

@denk-mal
Copy link
Author

denk-mal commented Mar 7, 2025

wlan0 state is "down" but carrier is true -> hence green. It is not Pi-hole's "fault" that a disconnected WiFi module is advertised with carrier = true I'd say here :-)

Full Ack

docker0 state is "down" and carrier is false -> red color. Does it mean you have no docker container running right now?

This is a miracle on my server because I have a lot of container up and running but ip addr show docker0 results in

6: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 12:da:95:65:ad:cb brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever

Image

@rdwebdesign
Copy link
Member

rdwebdesign commented Mar 10, 2025

docker0 DOWN doesn't mean you don't have containers running.

The docker0 interface is used only when you start a container using the default bridge network (without specifying another bridge network).
When all containers are using user-defined bridge networks (or host network), docker0 will be down.

@denk-mal
Copy link
Author

I know this known behavior and on my server most of the container - but not all container - using a custom network maintained from the traefik instance. One is working in host mode (dlna) and one is working on the default bridge (docker0). But honestly it is working so I would not claim about docker0 as marked 'down'. And it is not a fault of pihole so who cares, I don't.

@DL6ER
Copy link
Member

DL6ER commented Mar 10, 2025

I will mark this issue as "fixed in next release" as we have a few changes in development of the web component that style the interfaces better. It is good to know that the data we show is not wrong, though :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants