ip route flush cache triggers route -n flush which deletes all the routes on Mac, while the linux command would only delete routes from cache (which doesn't exist in Linux for quite some time for quite some time).
The current behavior is dangerous as it can break connection as it deletes default route.
ip route flush cache
triggersroute -n flush
which deletes all the routes on Mac, while the linux command would only delete routes from cache (which doesn't exist in Linux for quite some time for quite some time).The current behavior is dangerous as it can break connection as it deletes default route.
See http://linux-ip.net/html/tools-ip-route.html#tools-ip-route-flush-cache for the cache behavior, and http://linux-ip.net/html/tools-ip-route.html#tools-ip-route-flush for the normal behavior.
Since there is no equivalent of route cache on Mac, I suggest:
ip route flush cache
to no-op, it will only print it did nothing.ip route flush
will print"ip route flush" requires arguments.
.ip route flush table main
will doroute -n flush
This buggy behavior was introduced in #29 by @npeters, do you have any details for your use-case?