@Override
	public NetworkConfiguration offerResource(String mac) {
		ResourceStatus rs = null;
		String ip = null;
		checkTimeOutLease();
		synchronized(this) {
			for(Entry<String, ResourceStatus> e : getResources().entrySet()) {
				if(e.getValue().getMac().equals(mac) &&
				   e.getValue().isInLeasing()) {
					rs = e.getValue();
					rs.setStatus(Status.INOFFERING);
					ip = e.getKey();
				}
			}
			if(ip == null) {
				for(Entry<String, ResourceStatus> e : getResources().entrySet()) {
					if(e.getValue().isIdle()) {
						rs = e.getValue();
						ip = e.getKey();
						rs.setStatus(Status.INOFFERING);
						rs.setMac(mac);
						break;
					}
				}
			}
		}
		if(ip != null) {
			return generateConfiguration(ip);
		}
		return null;
	}