Skip to content

[bug] Bridge and VLAN interaction #340

Open

Description

@nemesifier

Describe the bug
A clear and concise description of the bug or unexpected behavior.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Create a template:
{
    "interfaces": [
        {
            "type": "bridge",
            "stp": false,
            "bridge_members": [
                "cpwlan0",
                "cpwlan1"
            ],
            "name": "br-wifi",
            "network": "wifi"
        },
        {
            "wireless": {
                "network": [
                    "wifi"
                ],
                "mode": "access_point",
                "radio": "radio0",
                "ssid": "SSID HERE",
                "encryption": {
                    "protocol": "none"
                },
                "wmm": true,
                "isolate": true,
                "macfilter": "disable",
                "maclist": []
            },
            "type": "wireless",
            "name": "cpwlan0"
        },
        {
            "wireless": {
                "network": [
                    "wifi"
                ],
                "mode": "access_point",
                "radio": "radio1",
                "ssid": "SSID HERE",
                "encryption": {
                    "protocol": "none"
                },
                "wmm": true,
                "isolate": true,
                "macfilter": "disable",
                "maclist": []
            },
            "type": "wireless",
            "name": "cpwlan1"
        },
        {
            "type": "8021q",
            "name": "br-wifi",
            "disabled": false,
            "vid": 200,
            "ingress_qos_mapping": [],
            "egress_qos_mapping": []
        }
    ]
}
  1. Assign the template to a device
  2. Look at the resulting configuration preview of the device and compare it with the config preview generated by the template

Result: they're not the same, the device conf is missing the br-wifi part.

Expected behavior
The resulting configuration is the same.

System Informatioon:

  • OS: Ubuntu 24.04.1 LTS
  • Python Version: Python 3.12.3 (main, Jan 17 2025, 18:03:48) [GCC 13.3.0] on linux

Activity

  1. keyxmakerx commented on Oct 24, 2025

    @keyxmakerx

    Apologies, was this issue ever fixed and implemented? I'm struggling with some automation for my configs with vlans, and they keep being wrong every time. Not sure if this is directly connected or not.

  2. nemesifier commented on Oct 24, 2025

    @nemesifier
    MemberAuthor

    @keyxmakerx in the recent releases we have addressed some VLAN issues.

    I haven't tired replicating again this issue on the latest master yet

  3. rohanesor commented on Nov 25, 2026

    @rohanesor

    I tried to reproduce this on current master (netjsonconfig 7705203, openwisp-controller 9adb79b) with the template from the description, and I can't reproduce it anymore:

    • In openwisp-controller, after assigning the template to a device, the device preview contains both br-wifi interfaces (the bridge and the 802.1q one with vid 200), same as the template preview.
    • In netjsonconfig, both interfaces are also kept when the template is merged with a device config that has its own interfaces, and when it's applied together with a second template.

    The fix in issues/340-duplicate-iterface-name (bbe3503) was never merged, so it looks like the later VLAN changes covered this. Happy to turn the reproduction into a regression test if you think it's worth keeping.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions