don't overwrite the flags we set when the interface goes up or down, instead just update the flags in the same place.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20553 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -347,10 +347,8 @@ datalink_control(net_domain *_domain, int32 option, void *value,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
request.ifr_flags = interface->flags;
|
interface->flags |= (request.ifr_flags & ~(IFF_UP | IFF_LINK));
|
||||||
}
|
} else {
|
||||||
|
|
||||||
if (status == B_OK) {
|
|
||||||
// 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(
|
||||||
interface->first_protocol, option, value, *_length);
|
interface->first_protocol, option, value, *_length);
|
||||||
@@ -654,17 +652,6 @@ interface_protocol_control(net_datalink_protocol *_protocol,
|
|||||||
return user_memcpy(&((struct ifreq *)argument)->ifr_flags,
|
return user_memcpy(&((struct ifreq *)argument)->ifr_flags,
|
||||||
&request.ifr_flags, sizeof(request.ifr_flags));
|
&request.ifr_flags, sizeof(request.ifr_flags));
|
||||||
}
|
}
|
||||||
case SIOCSIFFLAGS:
|
|
||||||
{
|
|
||||||
// set flags
|
|
||||||
struct ifreq request;
|
|
||||||
if (user_memcpy(&request, argument, sizeof(struct ifreq)) < B_OK)
|
|
||||||
return B_BAD_ADDRESS;
|
|
||||||
|
|
||||||
// TODO: check flags!
|
|
||||||
interface->flags = request.ifr_flags;
|
|
||||||
return B_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
case SIOCGIFPARAM:
|
case SIOCGIFPARAM:
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user