Skip to content

An empty link status list never zeroes the sender's outgoing cost #154

Closed as not planned

Description

@zigpy-review-bot

Problem

Since #144, a link status with an empty list never changes our outgoing cost to its sender. A neighbor that keeps sending empty lists therefore keeps its last non-zero cost for good, even when it no longer hears us.

Scenario: router R had us at cost 1. It then stops hearing us (a deaf receiver, an asymmetric link, or a restart after which it never gets a sample from us) and has no other router neighbor, so it sends an empty first-and-last list every period.

  • Each of those link statuses refreshes last_link_status_timestamp, so Neighbors::age() never ages the link out.
  • Nothing sets the outgoing cost to 0, so lost_link is never reported and invalidate_routes_via never runs.
  • R stays an expected broadcast relayer, and route requests from R keep passing the outgoing_cost == 0 check in route.rs.

This recovers only once R goes silent (then age() works) or sends a list that leaves us out, which needs R to hear some other router.

A probe test confirms it: 100 empty lists at 15 s spacing, with age(now, 60 s) after each. The cost stayed 1, no lost_link was reported, and age() returned nothing.

Spec

R23.2 3.6.4.4.2: a frame whose range does not cover the receiver is discarded "unless the link status list was completely empty". So an empty list is processed, and the natural reading is that the receiver is not found in it and the outgoing cost is set to 0.

#144 skips that on purpose. Our own empty startup link status made every neighbor drop its link to us (#143), and Ziggurat routers now keep their cost through it. That fix is still needed. The open question is how long an empty list may keep a cost.

Options

  • Follow the spec again (an empty list zeroes our outgoing cost to its sender). Since Add time scheduling with debouncing for gratuitous link statuses #145 we answer an empty list within a second, so a restarting neighbor learns its cost toward us quickly; our cost toward it comes back with its next list that names us. But our own empty startup link status would again zero the cost toward us at Ziggurat routers until our first non-empty link status, which is a full period after the start if the hold in feat: Background route refresh #147 lands (the Hold the first many-to-one route request until neighbors can accept it #143 problem again).
  • Keep the cost through a bounded number of consecutive empty lists from the same sender (one or two periods), then zero it.
  • Let the cost age out like a silent neighbor's: an empty list refreshes the sender's timestamp for other purposes, but not the one age() uses for the outgoing cost.

Which of these fits is a maintainer decision. Found while reviewing #144 after it was merged.

Activity

  1. puddly commented on Nov 23, 2026

    @puddly
    Member

    This is intentional. See the table in #143 (comment).

  2. zigpy-review-bot commented on Nov 23, 2026

    @zigpy-review-bot
    CollaboratorAuthor

    Thanks, that table answers it: keeping the cost on an empty list from a known router is what SiLabs and Telink do too, so a neighbor that keeps sending empty lists behaves here the way it does on those stacks. Closing as intended.

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

    No labels
    No labels

    Type

    Fields

    Priority

    None yet

    Size

    None yet

    Area

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions