摘要 |
<p>The embodiments of the present invention provide a message forwarding method and gateway for avoiding network attacks. Said method includes: when receiving an uplink message transmitted from a client, judging whether said uplink message is an Internet Control Message Protocol (ICMP) unreachable message; if said uplink message is not an ICMP unreachable message, setting a downlink message token counter as full; judging whether an uplink message token counter is equal to zero; if the uplink message token counter is equal to zero, discarding said uplink message; and if the uplink message token counter is not equal to zero, subtracting one from the numerical value of the uplink message token counter and forwarding said uplink message to a server side. Through a token mechanism, the method and gateway provided by the embodiments of the present invention monitor the forwarding procedure of stream-based uplink and downlink messages and avoid the situation of any excessive unidirectional packet transmission.</p> |