openwrt / openwrt/packages

mwan3: mwan3rtmon unable to copy nhid route to target route table

Open
#19,860 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Maintainer: @feckert
Environment: OpenWrt 22.03.2, r19803-9a599fee93

Description:

My tool is using nexthop to add routes, the route table looks like this:

root@openwrt:~# ip -6 ro
default nhid 1018 via fe80::882c:c1ff:fe7a:ae94 dev tap0 proto ospf metric 20 pref medium

Basically, the route is managed by nexthop id, explained here, the via ... dev ... part is managed by nhid. when mwan3rtmon encounter this route entry, it calls ip route add ... table N to copy it to the rt table, but it doesn't work.

Mon Nov 7 16:10:15 2022 user.warn mwan3rtmon[6169]: failed: 'ip -6 route replace table 4 default nhid 1018 via fe80::882c:c1ff:fe7a:ae94 dev tap0 proto ospf metric 20 pref medium' - error: Error: Nexthop specification and nexthop id are mutually exclusive.

The the nhid part already refers the via ... dev ... part, such that they are duplicated. The benefit of using nexthop id is that we don't need to consistently monitor the route, my routing daemon will update nexthop information when nexthop changes, such that all routing entry refer to that nexthop will be updated.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the mwan3rtmon entry point that handles routes and reviewing how it builds the ip -6 route replace table N command. Reproduce the reported nexthop route from the issue and verify that copying it to the target table no longer produces the mutually exclusive nexthop specification error.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.