Thanks for your query.Based on the facts that you have posted it appears that you have cracked foreskin with white discharge since last six months. This is due to bacterial infection of the foreskin termed as Posthatitis.
Are you are able to retract the your foreskin over glans penis
Please consult qualified Urologist
for clinical examination
Take antibiotic and anti fungal medications to combat infection , Get the prescription of medicines from your family Physician.
If you have a problem in retraction of foreskin you may need to get circumcised.