Closed wingo closed 5 years ago
Additionally, can be fixed in the same patch: if yang.load_configuration
is given a compiled file directly, but the compiled file fails to load for whatever reason, then we could erroneously return nil from this function.
In #1183, the
snabb-softwire-v2
schema gained a leaf. This should have been accompanied with a newrevision-date
in the schema, but it wasn't. With a new revision-date, old compiled configurations without this leaf would know that they're stale. If the stale configuration is used, you end up with a configuration without a given leaf or its default value, which breaks some invariants in the code.However -- the binary configuration loader currently does not detect that the loaded file is against an old revision. It should check that the binary was compiled against the latest revision of the schema known to Snabb.