summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/dhcp-packet.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-05-06 22:02:14 +0200
committerTom Gundersen <teg@jklm.no>2014-05-06 22:09:05 +0200
commit85923f79e1d1191673c5dffa4bdf1f5aadaa415b (patch)
treedf9d0952a3403396a0ce8b8e0965164d310403f6 /src/libsystemd-network/dhcp-packet.c
parent085cabf266bfbbc5ebdada9179a8ebe404e540a8 (diff)
sd-dhcp: network - set TOS on outgoing packets
This should improve performance on busy wireless networks and the like. Inspired by a similar change in dnsmasq.
Diffstat (limited to 'src/libsystemd-network/dhcp-packet.c')
-rw-r--r--src/libsystemd-network/dhcp-packet.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd-network/dhcp-packet.c b/src/libsystemd-network/dhcp-packet.c
index b012e63d1f..d72d7a686d 100644
--- a/src/libsystemd-network/dhcp-packet.c
+++ b/src/libsystemd-network/dhcp-packet.c
@@ -116,6 +116,8 @@ void dhcp_packet_append_ip_headers(DHCPPacket *packet, be32_t source_addr,
packet->ip.ihl = DHCP_IP_SIZE / 4;
packet->ip.tot_len = htobe16(len);
+ packet->ip.tos = IPTOS_CLASS_CS6;
+
packet->ip.protocol = IPPROTO_UDP;
packet->ip.saddr = source_addr;
packet->ip.daddr = destination_addr;