In the libosmo-sigtran cs7-instance vty scope, we have the same point-code command on adjacent scopes:
cs7 instance 1 point-code 1.2.3 ! sets primary_pc sccp-address msc point-code 0.0.1 sccp-address sgsn point-code 0.0.2
So if we reverse the order, we're in trouble:
cs7 instance 1 sccp-address msc point-code 0.0.1 sccp-address sgsn point-code 0.0.2 point-code 1.2.3 ! sets primary_pc
The parser interprets the last point-code to belong to the sgsn address scope, not the outer cs7 scope.
We could rename the sccp-address one to 'pc', but...
This reinforces the idea to do strict parsing of leading spaces in all our vty config files to interpret as explicit scope exit. That would break some running configs with odd spacing, but would also fix all of these issues forever.
Given we're moving to a kind of Osmocom 2.0, now would be a good time to make such a change.
If we from now on disallow tabs and enforce single-space indenting of child scopes, the code for that should be rather simple: count leading spaces and done. And we'd need to turn this off for interactive VTY shells.
~N