Skip to content

Bug: Setting TTL to u32::MAX cause it to be set to default #14

@PiotrKorkus

Description

@PiotrKorkus

Original report: https://github.com/qorix-group/inc_orchestrator_internal/issues/327

Describe the bug:

TTL is 8-bit value, but ttl and set_ttl from Rust's std work with u32.
Values in <256;u32::MAX) range cause invalid argument error, but u32::MAX causes TTL to be set to default value (64 for Linux).

Steps to reproduce the behavior:

  1. Checkout to arkjedrz_tcp-listener-tests.
  2. cd component_integration_tests/python_test_cases/
  3. Comment out pytest.xfail from TestTTL_Invalid::ttl in test_tcp_listener.py and test_tcp_stream.py files.
  4. pytest --build-scenarios -k "tcp and TTL_Invalid"

Observed behavior:

TTL is set to default on u32::MAX provided.

Expected behavior

set_ttl returns invalid argument error on u32::MAX provided.

Occurrence:

Always.

Attachments / Logs:

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions