socket-default: Fix setting DSCP value on FreeBSD

Fixes #3030.
This commit is contained in:
Tobias Brunner 2019-04-23 11:49:04 +02:00
parent 4c0d74bc12
commit 8da7dbe766
1 changed files with 4 additions and 0 deletions

View File

@ -559,7 +559,11 @@ METHOD(socket_t, sender, status_t,
{
if (family == AF_INET)
{
#ifdef __FreeBSD__
int ds4;
#else
uint8_t ds4;
#endif
ds4 = packet->get_dscp(packet) << 2;
if (setsockopt(skt, SOL_IP, IP_TOS, &ds4, sizeof(ds4)) == 0)