Added function captiveportal_init_dn_rules to release all pipesno at start

And others changes.