Skip to content

fleet-proxy(udp-forward): fleet-udp-forward silently overwrites duplicate scalar flags — last --target/--proxy/--bind/--ports wins #6139

Closed

Description

@dezren39

fleet-proxy(udp-forward): fleet-udp-forward silently overwrites duplicate scalar flags — last --target/--proxy/--bind/--ports wins

Summary

The CONNECT-UDP client shim bin fleet-udp-forward
(pkgs/fleet/crates/fleet-proxy/src/bin/fleet-udp-forward.rs, landed
in PR #6122 for #6109) parses its flags in a hand-rolled loop
(lines 52–75) where every scalar flag assigns unconditionally:
proxy = v (line 53), bind = ip (line 58), target = Some(v)
(line 64), ports = Some(v) (line 68). Repeating any of them silently
discards the first value — no error, no warning. Only --map is
repeatable by design (it pushes onto a Vec, line 71–75).

This is the silent-flag-loss class already filed per-parser for the
fleet's other hand-rolled parsers — #5939 (repo-queue client),
#5929 (proxy connect), #5713 (fleet-dispatch) — on the one parser
those filings could not cover: this bin was written after them.

Evidence (verified this run, laptop, real binary built from HEAD)

Laptop primary ~/git/code @ 7a980eb4cf; binary built with
cargo build -p fleet-proxy --bin fleet-udp-forward in pkgs/fleet.

  • fleet-udp-forward --target first.example --target second.example --ports 47998
    binds and serves with the second target, printing
    fleet udp-forward: udp:127.0.0.1:47998 -> second.example:47998 via 127.0.0.1:3131
    (ran until timeout, exit 124). first.example is discarded with no
    mention anywhere.
  • fleet-udp-forward --proxy 127.0.0.1:1111 --proxy 127.0.0.1:2222 --map 47998=127.0.0.1:47999
    serves via 127.0.0.1:2222 — the first proxy address is silently
    dropped the same way.

A script that concatenates a default flag set with an override set
(the usual way these duplicates happen) gets a forwarder pointed at
whichever value came last, with the run looking entirely successful.

Why it matters

Acceptance criteria

  • Repeating any scalar flag (--proxy, --bind, --target,
    --ports) in one invocation is a usage error naming the flag
    (stderr + usage, exit EXIT_USAGE = 2), before anything binds.
  • --map remains repeatable and accumulates, as documented.
  • Single-occurrence invocations behave byte-identically to today,
    including the --help surface.
  • Pinning tests cover each rejected duplicate shape plus the
    repeatable---map and single-value controls; cargo test -p fleet-proxy stays green.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor
  3. added
    app/fleetpkgs/fleet multicall binary + platform crates
    on Nov 5, 2026
  4. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 5, 2026
  6. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  7. added 2 commits that reference this issue on Nov 5, 2026
  8. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done — fixed + merged

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

    app/fleetpkgs/fleet multicall binary + platform crateskind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions