+ /*
+ * Mark default routes as (potentially) leading to the global internet
+ * this can be used for policy decisions.
+ * The clone routes will inherit this flag.
+ * We check against the host flag as this works for default routes that have
+ * a gateway and defaults routes when all subnets are local.
+ */
+ if (req == RTM_ADD && (rt->rt_flags & RTF_HOST) == 0) {
+ rt->rt_flags |= RTF_GLOBAL;
+ }