handle all cases of SIOCSIFFLAGS in the same place
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20554 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -328,8 +328,8 @@ datalink_control(net_domain *_domain, int32 option, void *value,
|
|||||||
request.ifr_name);
|
request.ifr_name);
|
||||||
if (interface != NULL) {
|
if (interface != NULL) {
|
||||||
// filter out bringing the interface up or down
|
// filter out bringing the interface up or down
|
||||||
if (option == SIOCSIFFLAGS
|
if (option == SIOCSIFFLAGS) {
|
||||||
&& ((uint32)request.ifr_flags & IFF_UP)
|
if (((uint32)request.ifr_flags & IFF_UP)
|
||||||
!= (interface->flags & IFF_UP)) {
|
!= (interface->flags & IFF_UP)) {
|
||||||
if ((interface->flags & IFF_UP) != 0) {
|
if ((interface->flags & IFF_UP) != 0) {
|
||||||
// bring the interface down
|
// bring the interface down
|
||||||
@@ -346,8 +346,10 @@ datalink_control(net_domain *_domain, int32 option, void *value,
|
|||||||
? IFF_LINK : 0);
|
? IFF_LINK : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
interface->flags |= (request.ifr_flags & ~(IFF_UP | IFF_LINK));
|
if (status == B_OK)
|
||||||
|
interface->flags |= request.ifr_flags & ~(IFF_UP | IFF_LINK);
|
||||||
} else {
|
} else {
|
||||||
// pass the request into the datalink protocol stack
|
// pass the request into the datalink protocol stack
|
||||||
status = interface->first_info->control(
|
status = interface->first_info->control(
|
||||||
|
|||||||
Reference in New Issue
Block a user