698 |
|
} |
699 |
|
|
700 |
|
if ((ifr.ifr_flags & IFF_UP) != 0) { |
701 |
< |
network_iface_stat_ptr->up = 1; |
701 |
> |
if ((knp = kstat_data_lookup(ksp, "link_up")) != NULL) { |
702 |
> |
/* take in to account if link |
703 |
> |
* is up as well as interface */ |
704 |
> |
if (knp->value.ui32 != 0u) { |
705 |
> |
network_iface_stat_ptr->up = 1; |
706 |
> |
} else { |
707 |
> |
network_iface_stat_ptr->up = 0; |
708 |
> |
} |
709 |
> |
} |
710 |
> |
else { |
711 |
> |
/* maintain compatibility */ |
712 |
> |
network_iface_stat_ptr->up = 1; |
713 |
> |
} |
714 |
|
} else { |
715 |
|
network_iface_stat_ptr->up = 0; |
716 |
|
} |