T8292: Fix ndp-proxy verify key mismatch for prefix rules#5004
T8292: Fix ndp-proxy verify key mismatch for prefix rules#5004jd82k wants to merge 1 commit intovyos:currentfrom
Conversation
|
👍 |
|
I have read the CLA Document and I hereby sign the CLA |
|
@c-po @sarthurdev @sever-sever Please review this PR. |
There was a problem hiding this comment.
This PR looks like something inspired by an agent which is not wrong in general, but probably should somehow be marked as such?
Despite some minor changes in help strings or missing completion helpers it has one fundamental issue - described in our CONTRIBUTING file.
Every change set must be consistent (self containing)! Do not fix multiple bugs in a single commit. If you already worked on multiple fixes in the same file use git add –patch to only add the parts related to the one issue into your upcoming commit.
So here you have changes in radvd and also ndppd which should both go even into their own discrete task filed with out public issue tracker.
56e8505 to
d9249c7
Compare
668e391 to
28b8212
Compare
Thanks for the review. English is not my first language, so sorry if any wording was unclear. I understand and respect the CONTRIBUTING rule that each change set must be self-contained and focused on one issue. I will split this into separate discrete tasks/PRs: Each PR will be independently testable and scoped to one issue. Thanks again for the guidance. |
|
Please review this PR. Thanks! @sever-sever @dmbaturin @sarthurdev @c-po |
c-po
left a comment
There was a problem hiding this comment.
Why is it required to introduce a new dynamic CLI node?
Using VyOS stream 2026.02 shows:
set service ndp-proxy interface eth0 prefix ::/0
commit
$ cat /run/ndppd/ndppd.conf
# autogenerated by service_ndp-proxy.py
# This tells 'ndppd' how often to reload the route file /proc/net/ipv6_route
route-ttl 30000
# This sets up a listener, that will listen for any Neighbor Solicitation
# messages, and respond to them according to a set of rules
proxy eth0 {
# Turn on or off the router flag for Neighbor Advertisements
router no
# Control how long to wait for a Neighbor Advertisment message before invalidating the entry (milliseconds)
timeout 500
# Control how long a valid or invalid entry remains in the cache (milliseconds)
ttl 30000
# This is a rule that the target address is to match against. If no netmask
# is provided, /128 is assumed. You may have several rule sections, and the
# addresses may or may not overlap.
rule ::/0 {
static
}
}So then generated rule looks like the same as what you wanted to do using dynamic keyword.
Thanks for pointing this out. My original intent was to add a more semantic I have updated the PR so it now contains only the verify bug fix ( Sorry for the scope noise in the previous version, and thank you for the guidance. |
|
As this feels to be LLM generated lets try my luck. The changed code works on parts which will raise ConfigErrors if certain CLI settings are honored/dishonored. The code path has no corresponding test in |
Done. Please review. Thanks |
|
Now everything is ok. |
7ba5f94 to
39eb612
Compare
…orrectly` Switch `verify()` to validate the real config tree (`interface -> prefix`) instead of non-existent `rule` nodes. This enforces: - `mode interface` requires `prefix ... interface` - non-`interface` modes must not set `prefix ... interface` - referenced interface exists when `mode` is `interface`
|
CI integration ❌ failed! Details
|
|
|
||
| if mode == 'interface': | ||
| if not prefix_interface: | ||
| raise ConfigError(f'Prefix "{prefix}" uses interface mode but no interface defined!') |
There was a problem hiding this comment.
interface is optional https://github.com/DanielAdolfsson/ndppd/blob/master/ndppd.conf-dist#L83C1-L86C43
but here you make it required which also breaks existing configurations.
There was a problem hiding this comment.
The original code already required interface when mode == interface.
There was a problem hiding this comment.
I can change it but it will not follow the original code.
There was a problem hiding this comment.
I think there is a misunderstanding here: in ndppd, choosing a rule method is optional (it defaults to static for compatibility), but if the selected method is iface/interface, the interface argument is not optional. The syntax in ndppd.conf-dist is "iface ", and the description says forwarding is done through the specified interface.
Change summary
Switch
verify()to validate the real config tree (interface -> prefix) instead of non-existentrulenodes.This enforces:
mode interfacerequiresprefix ... interfaceinterfacemodes must not setprefix ... interfacemodeisinterfaceTypes of changes
Related Task(s)
https://vyos.dev/T8292
Related PR(s)
Checklist:
Smoketest