I'm using OpenWrt with the Mediatek7688.

I have a problem with the routing table, which it seems to not update properly. I'm connecting it as STA to my home router or to my iPhone and sometimes the routing table doesn't get updated with the new config (ie: there no default gateway, no other route). But also, sometimes, the old routing table remains there even the wifi STA connection gets disconnected.

Therefore, my questions are:
1. who is responsible to update the routing table?
2. how I can manually invoke to "refresh" the routing table when the wifi gets connected or disconnected?

I'm using kernel 3.18.45, CC.

Thanks,
Cezane.