Variation of the extinction law in the Trifid nebula