[Xorp-hackers] Tiny patch to detect missing operators to prevent logic error / unreachable code crash

Pavlin Radoslavov pavlin at icir.org
Wed Jul 5 12:04:52 PDT 2006


> This problem does not become apparent in xorpsh, but only in xgdaemon -- it is
> only reproducible in the Vyatta GUI.  The xorpsh will work fine without the
> patch.
> 
> The reason for this is that the xorpsh and xgdaemon modify the config in
> slightly different ways -- while the xorpsh completely prohibits setting and
> committing invalid values to config nodes, the Vyatta GUI xgdaemon only
> prohibits committing invalid configs, but still allows setting.  The xgdaemon
> simply alerts the user when invalid values are temporarily set without a
> commit, and then the user can make corrections later based on the warning
> alert notifications.  The GUI has been implemented slightly differently
> because by its nature it allows the user to specify multiple valid and invalid
> values at once, and the xgdaemon has to cache and keep track of all of them.
> 
> The crash occurred when the xgdaemon started checking the whole tree for
> invalid nodes to determine if the configuration was committable with a call to
> ConfigTreeNode::check_config_tree(...).  This patch allows the check to
> correctly return false when config nodes with missing required operators are
> present on the tree.

Thank you for the detailed explanation, now it makes perfect sense.
Fix committed to XORP CVS:

Revision  Changes                              Path
1.22      +6 -1;  commitid: bada44ac096c7ea6; xorp/rtrmgr/template_base_command.cc

Pavlin



More information about the Xorp-hackers mailing list