KatharaFramework / kathara-lab-checker

Tool to automatically check Kathará network scenarios based on a configuration file.
https://www.kathara.org/
GNU General Public License v3.0
3 stars 1 forks source link

Missing negative check #11

Closed xReniar closed 1 week ago

xReniar commented 2 weeks ago

The Kernel Route checker is missing a negative route. If a route is inserted such as "!0.0.0.0/0" the checker always return an error

https://github.com/KatharaFramework/kathara-lab-checker/blob/0825e8c352d1e0e0bb80ebba9874582febb81ea5/src/kathara_lab_checker/checks/KernelRouteCheck.py#L20

tcaiazzi commented 2 weeks ago

Dear @xReniar,

With @lorenzo93 we changed the behavior of the test forcing to write the complete routing table inside the configuration.

The check succeeds only if all the routes declared in the configuration are present in the device, and if all the routes in the device are in the configuration.

From the README:

# checks that the expected routing table is equal to the the actual table of a device
"kernel_routes": { 
      "<device_name>": [
        "<route>", # Check the presence of the route in the data-plane of the device
        "[<route>, [<iface_name_1>, <iface_name_2>]]" # Check the presence of the route in the data-plane of the device
                                                      # And checks also that the nexthops are set on the correct interfaces
      ]
    },

I don't know if this is the best behavior as possible, and if the description in the README is clear.

What do you think @lorenzo93?