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:
Hugo Santos 2007-04-04 12:51:23 +00:00
parent e65e15292c
commit ca2aa96377
1 changed files with 2 additions and 15 deletions

View File

@ -347,10 +347,8 @@ datalink_control(net_domain *_domain, int32 option, void *value,
}
}
request.ifr_flags = interface->flags;
}
if (status == B_OK) {
interface->flags |= (request.ifr_flags & ~(IFF_UP | IFF_LINK));
} else {
// pass the request into the datalink protocol stack
status = interface->first_info->control(
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,
&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:
{