dhcpcd-3.0.3
NIS setup (yp.conf / domainname) works again.
-Send hostname/fqdn and our parameter list in DISCOVER and INFORM messages too.
+Send hostname/fqdn in DISCOVER and INFORM messages too.
Add more debug messages.
Fix writing to resolv.conf when resolvconf not present.
Include linux/if_addr.h for 2.6.19+ kernels, thanks to AlexExtreme.
n_params = p;
*p++ = 0;
- *p++ = DHCP_RENEWALTIME;
- *p++ = DHCP_REBINDTIME;
- *p++ = DHCP_NETMASK;
- *p++ = DHCP_BROADCAST;
- *p++ = DHCP_CSR;
- /* RFC 3442 states classless static routes should be before routers
- * and static routes as classless static routes override them both */
- *p++ = DHCP_ROUTERS;
- *p++ = DHCP_STATICROUTE;
- *p++ = DHCP_HOSTNAME;
- *p++ = DHCP_DNSSEARCH;
- *p++ = DHCP_DNSDOMAIN;
- *p++ = DHCP_DNSSERVER;
- *p++ = DHCP_NISDOMAIN;
- *p++ = DHCP_NISSERVER;
- *p++ = DHCP_NTPSERVER;
- /* These parameters were requested by dhcpcd-2.0 and earlier
- but we never did anything with them */
- /* *p++ = DHCP_DEFAULTIPTTL;
- *p++ = DHCP_MASKDISCOVERY;
- *p++ = DHCP_ROUTERDISCOVERY; */
+ /* Only request DNSSERVER in discover to keep the packets small.
+ RFC2131 Section 3.5 states that the REQUEST must include the list
+ from the DISCOVER message, so I think we can safely do this. */
+
+ if (type == DHCP_DISCOVER)
+ *p++ = DHCP_DNSSERVER;
+ else
+ {
+ *p++ = DHCP_RENEWALTIME;
+ *p++ = DHCP_REBINDTIME;
+ *p++ = DHCP_NETMASK;
+ *p++ = DHCP_BROADCAST;
+ *p++ = DHCP_CSR;
+ /* RFC 3442 states classless static routes should be before routers
+ * and static routes as classless static routes override them both */
+ *p++ = DHCP_ROUTERS;
+ *p++ = DHCP_STATICROUTE;
+ *p++ = DHCP_HOSTNAME;
+ *p++ = DHCP_DNSSEARCH;
+ *p++ = DHCP_DNSDOMAIN;
+ *p++ = DHCP_DNSSERVER;
+ *p++ = DHCP_NISDOMAIN;
+ *p++ = DHCP_NISSERVER;
+ *p++ = DHCP_NTPSERVER;
+ /* These parameters were requested by dhcpcd-2.0 and earlier
+ but we never did anything with them */
+ /* *p++ = DHCP_DEFAULTIPTTL;
+ *p++ = DHCP_MASKDISCOVERY;
+ *p++ = DHCP_ROUTERDISCOVERY; */
+ }
*n_params = p - n_params - 1;