In this paper we present a framework for generating walking motions for a humanoid robot and how to adapt the trajectory to handle disturbances during the execution of the trajectory. Based on the simplified dynamics of a mass concentrated model, we generate a physically consistent motion that depends on the current CoM state space of the robot. If the disturbance is low, it is possible to adapt the trajectory in order to reach the desired next step position. In the case of strong disturbances, we show how to modify the final goal under a reactive stepping framework. Simulations and hardware experiments with the full-size humanoid HRP-4 show the validity of the proposed scheme.