* Jamal Hadi Salim <[EMAIL PROTECTED]> 2005-11-10 10:45 > from inspection: Whats wrong with what netif_carrier_ok() tells you? > i.e to extrapolate what you have (it seems to be out > fib_netdev_event())- something along: > > case NETDEV_CHANGE: > rt_cache_flush(0); > if (!netif_carrier_ok(dev)) { > printk("%s:link went down\n",dev->name); > fib_disable_ip(dev, 0); > } > if (netif_carrier_ok(dev)) { > printk("%s:link went up\n",dev->name); > call the code NETDEV_UP uses; > }
Unfortunatenly this doesn't work because NETDEV_CHANGE notifications are also sent out for changes not related carrier/admin state, see callers of netdev_state_change(). - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html