Stop using SOL_TCP, SOL_IP and SOL_IPV6.
[tinc] / src / net_packet.c
index 7d61e7b..345175e 100644 (file)
@@ -719,10 +719,10 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
        if(priorityinheritance && origpriority != listen_socket[sock].priority) {
                listen_socket[sock].priority = origpriority;
                switch(sa->sa.sa_family) {
-#if defined(SOL_IP) && defined(IP_TOS)
+#if defined(IPPROTO_IP) && defined(IP_TOS)
                case AF_INET:
                        logger(DEBUG_TRAFFIC, LOG_DEBUG, "Setting IPv4 outgoing packet priority to %d", origpriority);
-                       if(setsockopt(listen_socket[sock].udp.fd, SOL_IP, IP_TOS, &origpriority, sizeof origpriority)) /* SO_PRIORITY doesn't seem to work */
+                       if(setsockopt(listen_socket[sock].udp.fd, IPPROTO_IP, IP_TOS, &origpriority, sizeof origpriority)) /* SO_PRIORITY doesn't seem to work */
                                logger(DEBUG_ALWAYS, LOG_ERR, "System call `%s' failed: %s", "setsockopt", sockstrerror(sockerrno));
                        break;
 #endif