Skip to content

interfaces: regex matches VLAN bridge wrongly after migrationΒ #1418

@Tbaile

Description

@Tbaile

Steps to reproduce

  • Migrate a configuration with a device section named like 'br111' (e.g. a bridge)
  • Add a VLAN device that references the bridge (e.g. 'br111.112' referencing 'br111')
  • Trigger device parsing logic (e.g. running ns.devices script) or browse the interfaces UI

Expected behavior

  • The system should correctly distinguish between bridge and VLAN logical device names.
  • VLANs referencing valid bridge names should not cause exceptions or parsing issues.

Actual behavior

  • The code matches device sections named 'brNN.*' as bridges using re.match(r"^br[0-9]+(?!\.)", device.get('name', '')).
  • This match is too permissive: for a config like br111.112, the VLAN device is also partially matched as a bridge, causing parsing errors.
  • Ui fails to show results

Components

  • ns-api: 3.4.0-r1

See also

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    ToDo πŸ•

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions