Move some of the functions of cjdns-openwrt into cjdns proper