Comment 1 for bug 1819212

Revision history for this message
Dan Sneddon (dsneddon) wrote :

It turns out that this is a compound bug with two code errors. The first is the command-line parameters being passed as a string instead of a pointer to the args. The second is an incorrect filename in checking existing routes. This code:

            for interface in apply_routes:
                logger.debug('Applying routes for interface %s' % interface[0])
                commands = self.iproute2_route_commands(interface[0], interface[1])

is passing an interface name where it should be passing a filename. Here is the corrected code:

            for interface in apply_routes:
                logger.debug('Applying routes for interface %s' % interface[0])
                filename = self.root_dir + route_config_path(interface[1])
                commands = self.iproute2_route_commands(interface[0], filename)