title: iptables, setting DSCP for DHCP?
body: <p>I'm trying to set the DSCP bits on DHCP packets. Although the below works fine for udp, the packet is always sent with DSCP of 16. Any ideas? </p>
  
  <pre><code> iptables -t mangle -A FORWARD -p udp -j DSCP --set-dscp 1
   iptables -t mangle -A OUTPUT -p udp -j DSCP --set-dscp 1
   iptables -t mangle -A PREROUTING -p udp -j DSCP --set-dscp 1
   iptables -t mangle -A POSTROUTING -p udp -j DSCP --set-dscp 1
  </code></pre>
  
  <p>I'm using dhclient - I don't see any option there to set it either.</p>
  
  <p>Looks like dhclient hard codes it here, fyi:</p>
  
  <pre><code>void assemble_udp_ip_header (interface, buf, bufix,
                               from, to, port, data, len)
          struct interface_info *interface;
          unsigned char *buf;
          unsigned *bufix;
          u_int32_t from;
          u_int32_t to;
          u_int32_t port;
          unsigned char *data;
          unsigned len;
  {
          struct ip ip;
          struct udphdr udp;
  
          memset (&amp;ip, 0, sizeof ip);
  
          /* Fill out the IP header */
          IP_V_SET (&amp;ip, 4);
          IP_HL_SET (&amp;ip, 20);
          ip.ip_tos = IPTOS_LOWDELAY;
  </code></pre>