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

Interface page fails due to invalid JSON with QoS enabled on PPPoE interface #804

Closed
gsanchietti opened this issue Sep 30, 2024 · 2 comments
Assignees
Labels
verified All test cases were verified successfully

Comments

@gsanchietti
Copy link
Member

gsanchietti commented Sep 30, 2024

Steps to reproduce

  1. Create a PPPoE WAN interface named WAN1_WiMe.

  2. Enable QoS on the WAN1_WiMe interface.

  3. On a NethSecurity system, attempt to access the interface page from the GUI.

  4. The system fails to load with an error, and logs show the following:

    root@firewall:~# /usr/libexec/rpcd/ns.devices call list-devices
    {"error": "json_given_is_invalid"}
  5. Running the following command reveals the issue with the ip -j address command:

    root@firewall:~# ip -j address | jq
    parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 1, column 3929

Expected behavior

  • The interface list should load properly without errors.

Actual behavior

  • The error is traced to invalid characters in the output of the ip -j address command, which causes the JSON to fail.

Investigation

  • The issue is related to a bad character or string in one of the interfaces created by qosify. Specifically, the interface ifb-pp<bad_char> causes issues with both the ifconfig and the JSON output of the ip command.

  • If the qosify service is stopped, the issue goes away:

    /etc/init.d/qosify stop

Workaround

  • A temporary fix involves renaming the interface, particularly for pppoe interfaces, to shorter names (max 5 characters, avoiding special characters) to prevent this issue. For Ethernet interfaces, the name length limit is 13 characters.

  • This issue likely appeared after enabling qosify.

Additional context

  • If the partner cannot rename the pppoe interface due to system access limitations, the issue might persist until this can be done.

Components

NethSecurity Image: 8-23.05.4-ns.1.2.0

@andre8244
Copy link
Collaborator

Testing image

23.05.5-ns.1.2.99-alpha1-49-gd35f90fee2

Test case 1

  • Go to Network > Interfaces and devices
  • Click Configure on an unassigned device
  • Enter an interface name longer than 5 characters
  • Select WAN zone and PPPoE protocol
  • Click Configure interface
  • Verify that a validation error is shown under Interface name field
  • Enter an interface name containing at maximum 5 characters
  • Click Configure interface
  • Go to Network > QoS
  • Configure Quality of Service on the previously configured interface
  • Verify that QoS work as expected

Test case 2

  • Go to Network > Interfaces and devices
  • Click Configure on an unassigned device
  • Enter an interface name longer than 5 characters
  • Configure the device by selecting a protocol different from PPPoE
  • Click Configure interface
  • Reopen the configuration drawer by clicking Edit on the previously configured interface
  • Select WAN zone and PPPoE protocol
  • Click Configure interface
  • Verify that a validation error is shown under Interface name field. It should invite the user to reconfigure the device from scratch

@andre8244 andre8244 added the testing Packages are available from testing repositories label Oct 3, 2024
@gsanchietti gsanchietti self-assigned this Oct 7, 2024
@gsanchietti
Copy link
Member Author

Both cases have been verified.

@gsanchietti gsanchietti added verified All test cases were verified successfully and removed testing Packages are available from testing repositories labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified All test cases were verified successfully
Projects
Archived in project
Development

No branches or pull requests

2 participants