IFS_DOWN with DHCP comes back up!

I am able to switch back and forth between static and DHCP using ifconfig but I noticed something strange. Once I use IFS_UP with IFS_DHCP set, if I then do IFS_DOWN, the returned value for ifpending is initially 0 (IF_DOWN) but a short time later (sometimes up to 5 seconds) it returns 2 (IF_UP). The only thing my code does after sending IFS_DOWN is tcp_tick().

Why does the interface automatically come back up? How can I keep the interface down? When not using DHCP, the interface stays down but once I use DHCP, it pops back “up” until I reset the board.

I’m using Dynamic C 10.64 with an RCM5700 module.

The only way I found to solve this is to call forceSoftReset(). It’s a brute force approach but it works for my application.