added longest prefix checj and send icmp message if ttl<=1