def parse(self):
        r = []
        prefix = None
        for line in self.out:
            field = line.split()
            if field[0] == "nexthop":
                if not prefix:
                    # this saves only the first nexthop entry if multiple exist
                    continue
            else:
                prefix = field[0]
                metric = field[-1]
            tmp = prefix.split("/")
            if 2 < len(tmp):
                prefix += "/32"
            if field[1] == "proto":
                # nexthop entry is on the next line
                continue
            gw = field[2]   # nexthop IP or interface
            r.append(Route(prefix, gw, metric))
            prefix = None

        if len(r) == 0:
            self.warn("no kernel routes")
        if self.verbose:
            self.info("  %s has %d kernel routes" % (self.node.routerid, len(r)))
        return r
dataset/ETHPy150Open coreemu/core/daemon/examples/netns/ospfmanetmdrtest.py/KernelRoutes.parse/swapped operands of `<`