Files
RedBear-OS/netstack
Red Bear OS e818909712 route: metric/preference field (mirrors iproute2 metric)
Rule gains metric: u32 field (default 0). Lower metric = higher
priority. lookup_rule() now selects the matching rule with the
lowest metric among those with the same prefix length.

route/add parser accepts 'metric N':
  default via 10.0.2.2 metric 100
  default via 10.0.2.254 metric 200

Display shows metric when non-zero:
  default via 10.0.2.2 dev eth0 src 10.0.2.15 metric 100

Rule::with_metric(m) builder added. All existing callers use
default metric=0 (backward compatible).

Use case: multi-homed hosts with primary/backup default routes.
The primary route has metric 0, the backup has metric 100.

All 31 tests pass.
2026-07-09 10:47:53 +03:00
..