]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
socket-default: Fix setting DSCP value on FreeBSD
authorTobias Brunner <tobias@strongswan.org>
Tue, 23 Apr 2019 09:49:04 +0000 (11:49 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 23 Apr 2019 09:49:04 +0000 (11:49 +0200)
Fixes #3030.

src/libcharon/plugins/socket_default/socket_default_socket.c

index 68e5a7a0e9090881daa2499e13ef3e6846fef544..b59b60c3e49d9a729fe269e6990567f6705bd93e 100644 (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)