A computer-executable method for processing an interest in a content-centric network, CCN, to avoid routing loops, the method comprising: receiving, by a first node in the CCN, the interest for a piece of content from a second node, wherein the interest indicates a name of the piece of content and a hop count from the second node to a destination node advertising the piece of content; the method further comprising: determining, based on forwarding information and information associated with pending interests stored on the first node, whether a distance-based forwarding condition is met; wherein the forwarding information includes one or more entries associated with the name of the content piece, wherein a respective entry specifies a hop count from the first node to the destination node and a next hop neighbor through which the first node can forward the interest to the destination node; wherein the information associated with pending interests includes one or more entries indexed using the name of the content piece, wherein each entry corresponds to a pending interest and each entry specifies the name of the content piece, a flag stating whether the interest has been satisfied with the content piece, a hop count assumed by the router when it forwards the interest, a set of incoming neighbors from which interests for the content piece are received, a set of outgoing neighbors to whom the node forwards its interests, a number of retransmissions allowed for the same interest and a remaining lifetime of the interest; wherein the distance-based forwarding condition is satisfied if the hop count specified by at least one of the entries (302, 402) in the forwarding information or the information associated with pending interests for the content piece is less than the hop count indicated by the received interest; and in response to the distance-based forwarding condition being met, accepting the interest. determining, based on forwarding information and information associated with pending interests stored on the first node, whether a distance-based forwarding condition is met; wherein the forwarding information includes one or more entries associated with the name of the content piece, wherein a respective entry specifies a hop count from the first node to the destination node and a next hop neighbor through which the first node can forward the interest to the destination node; wherein the information associated with pending interests includes one or more entries indexed using the name of the content piece, wherein each entry corresponds to a pending interest and each entry specifies the name of the content piece, a flag stating whether the interest has been satisfied with the content piece, a hop count assumed by the router when it forwards the interest, a set of incoming neighbors from which interests for the content piece are received, a set of outgoing neighbors to whom the node forwards its interests, a number of retransmissions allowed for the same interest and a remaining lifetime of the interest; wherein the distance-based forwarding condition is satisfied if the hop count specified by at least one of the entries (302, 402) in the forwarding information or the information associated with pending interests for the content piece is less than the hop count indicated by the received interest; and in response to the distance-based forwarding condition being met, accepting the interest.