dispersion-free propagation

Can you show how the dispersion-free propagation of photons is given by the null-condition \(\mathrm{d}s^2=0\)? Is it possible to generate this to massive particles?