Add support for "inactive" and "ephemeral" node properties to the parser
Closed, ResolvedPublic


Some consideraions:

This stuff should be... conscpicious and impossible to ignore while skimming through a config, so I suggest #INACTIVE and #EPHEMERAL tokens. JunOS uses "inactive: " before the node, which hardly catches the eye so well.
The best place for the properties is likely between the comment and the node name.
Nodes can be both inactive and ephemeral (e.g. a user deactivated a statement inserted by a transition script).
While ephemeral nodes do not make it to the saved config when saved by vyconf, we should support them in the loader for two reasons: 1. people may try loading config produced by copy-pasting show output, and that's a valid thing to do 2. I suppose one may want to include them on purpose to do certain first boot things.
I can't think of any other properties, so I think for now we can hardcode #INACTIVE and #EPHEMERAL as tokens. For simplicity we may also want to require that #EPHEMERAL comes after #INACTIVE There is some hack value in implementing the general case for sure, but I don't know if we really need it or not.


<node> ::= <comment> <inactive> <ephemeral> <identifier> ...


protocols {
  static {
    /* some nasty attacker */
    #EPHEMERAL route {
    /* that one may be innocent so we deactivated it */
  bgp 64555 {
    neighbor {
      remote-as 65300;
      /* not sure if we need ebgp-multihop for this peer */
      #INACTIVE ebgp-multihop 255; 


Difficulty level
Normal (likely a few hours)
dmbaturin closed this task as Resolved.Jan 15 2017, 6:36 PM
dmbaturin claimed this task.