A method comprising: configuring as a Policy and Charging, PCC, rule a filter and a rule action for the filter for use in a gateway device of a mobile packet core network, the filter being configured to detect data packets of a user session flowing to/from the mobile packet core network that match the filter, detecting, by an operator of the mobile packet core network, a link failure or a route failure affecting connectivity to a packet data network, subsequently enabling and activating the rule at the gateway device, so that: the gateway, in accordance with the rule action, terminates a user session when a data packet of the user session, which flows to/from the mobile packet core network from/to a user device, matches the filter, by invoking a procedure of deleting the user session, the procedure being initiated by the gateway device, and the user device making a new user session re-establishment via another gateway device, said matching occurring when the user device sends data packets towards the packet data network to which connectivity is affected by said link failure or route failure and being performed by means of a layer 4 filter that contains user device address ranges that are known to have connection to said packet data network; and when a data packet of the user session, which flows to/from the mobile packet core network from/to a user device, does not match the filter, the next step is to return to matching data packets of the user session to the filter. configuring as a Policy and Charging, PCC, rule a filter and a rule action for the filter for use in a gateway device of a mobile packet core network, the filter being configured to detect data packets of a user session flowing to/from the mobile packet core network that match the filter, detecting, by an operator of the mobile packet core network, a link failure or a route failure affecting connectivity to a packet data network, subsequently enabling and activating the rule at the gateway device, so that: the gateway, in accordance with the rule action, terminates a user session when a data packet of the user session, which flows to/from the mobile packet core network from/to a user device, matches the filter, by invoking a procedure of deleting the user session, the procedure being initiated by the gateway device, and the user device making a new user session re-establishment via another gateway device, said matching occurring when the user device sends data packets towards the packet data network to which connectivity is affected by said link failure or route failure and being performed by means of a layer 4 filter that contains user device address ranges that are known to have connection to said packet data network; and when a data packet of the user session, which flows to/from the mobile packet core network from/to a user device, does not match the filter, the next step is to return to matching data packets of the user session to the filter. the gateway, in accordance with the rule action, terminates a user session when a data packet of the user session, which flows to/from the mobile packet core network from/to a user device, matches the filter, by invoking a procedure of deleting the user session, the procedure being initiated by the gateway device, and the user device making a new user session re-establishment via another gateway device, said matching occurring when the user device sends data packets towards the packet data network to which connectivity is affected by said link failure or route failure and being performed by means of a layer 4 filter that contains user device address ranges that are known to have connection to said packet data network; and when a data packet of the user session, which flows to/from the mobile packet core network from/to a user device, does not match the filter, the next step is to return to matching data packets of the user session to the filter.