I breast fed my son for 4yrs(just 2xper day for the last 2yrs) and my daughter for nearly 3. They have been so healthy and I atribute this to long term immunities they developed from long term breast feeding.
Both of my kids have only 3 cases of stomach flu(they are 14 and 11) and they have travelled to many exotic places. They have also only had 2 or 3 ear aches in their life. My family(that was not breast fed, myself included, had many cases of ear aches, strep, and stomach viruses and kids).
Some people question comforting children this way, but I certainly feel this type of close cuddling and comforting attachment is a real blessing. In less developed societies, that have not embraced artifical means of pacifying and feeding, the average age of weaning is 5yrs. If you and your child are happy with the arrangement that is all the permission you need. If not then you will need to look for some other way to comfort your child when they wake up or go to bed.
I think what you are doing is fantastic.