router: fix ip rule pref parsing (pref is $1 with colon, not a named field)
ip rule show format is "PREF:\tfrom ... lookup TABLE", not "... pref PREF".
The awk was looking for a "pref"/"priority" field that doesn't exist, so
old rules were never removed and new prefs were never applied.
Also fix grep -c/-q "lookup TABLE" to use -w (word boundary) to prevent
"lookup 2" from matching "lookup 200".
Co-Authored-By:
Claude Opus 4.6 <noreply@anthropic.com>
Showing
Please
register
or
sign in
to comment