Author: brooks
Date: Sun Oct 26 19:28:04 2008
New Revision: 184297
URL: http://svn.freebsd.org/changeset/base/184297

Log:
  MFC r183974:
   Support the remaining options listed in dhcp-options(5) and RFC 2132.
  
  PR:           bin/127076
  Submitted by: jkim
  Approved by:  re (kensmith)

Modified:
  stable/6/sbin/dhclient/   (props changed)
  stable/6/sbin/dhclient/dhclient.c
  stable/6/sbin/dhclient/dhcp.h
  stable/6/sbin/dhclient/tables.c

Changes in other areas also in this revision:
Modified:
  releng/6.4/sbin/dhclient/   (props changed)
  releng/6.4/sbin/dhclient/dhclient.c
  releng/6.4/sbin/dhclient/dhcp.h
  releng/6.4/sbin/dhclient/tables.c
  stable/7/sbin/dhclient/   (props changed)
  stable/7/sbin/dhclient/dhclient.c
  stable/7/sbin/dhclient/dhcp.h
  stable/7/sbin/dhclient/tables.c

Modified: stable/6/sbin/dhclient/dhclient.c
==============================================================================
--- stable/6/sbin/dhclient/dhclient.c   Sun Oct 26 19:22:10 2008        
(r184296)
+++ stable/6/sbin/dhclient/dhclient.c   Sun Oct 26 19:28:04 2008        
(r184297)
@@ -2301,12 +2301,16 @@ check_option(struct client_lease *l, int
        case DHO_NETBIOS_DD_SERVER:
        case DHO_FONT_SERVERS:
        case DHO_DHCP_SERVER_IDENTIFIER:
+       case DHO_NISPLUS_SERVERS:
+       case DHO_MOBILE_IP_HOME_AGENT:
        case DHO_SMTP_SERVER:
        case DHO_POP_SERVER:
        case DHO_NNTP_SERVER:
        case DHO_WWW_SERVER:
        case DHO_FINGER_SERVER:
        case DHO_IRC_SERVER:
+       case DHO_STREETTALK_SERVER:
+       case DHO_STREETTALK_DA_SERVER:
                if (!ipv4addrs(opbuf)) {
                        warning("Invalid IP address in option: %s", opbuf);
                        return (0);
@@ -2314,6 +2318,8 @@ check_option(struct client_lease *l, int
                return (1)  ;
        case DHO_HOST_NAME:
        case DHO_NIS_DOMAIN:
+       case DHO_NISPLUS_DOMAIN:
+       case DHO_TFTP_SERVER_NAME:
                if (!res_hnok(sbuf)) {
                        warning("Bogus Host Name option %d: %s (%s)", option,
                            sbuf, opbuf);
@@ -2372,6 +2378,7 @@ check_option(struct client_lease *l, int
        case DHO_DHCP_REBINDING_TIME:
        case DHO_DHCP_CLASS_IDENTIFIER:
        case DHO_DHCP_CLIENT_IDENTIFIER:
+       case DHO_BOOTFILE_NAME:
        case DHO_DHCP_USER_CLASS_ID:
        case DHO_END:
                return (1);

Modified: stable/6/sbin/dhclient/dhcp.h
==============================================================================
--- stable/6/sbin/dhclient/dhcp.h       Sun Oct 26 19:22:10 2008        
(r184296)
+++ stable/6/sbin/dhclient/dhcp.h       Sun Oct 26 19:28:04 2008        
(r184297)
@@ -155,12 +155,19 @@ struct dhcp_packet {
 #define DHO_DHCP_REBINDING_TIME                59
 #define DHO_DHCP_CLASS_IDENTIFIER      60
 #define DHO_DHCP_CLIENT_IDENTIFIER     61
+#define        DHO_NISPLUS_DOMAIN              64
+#define        DHO_NISPLUS_SERVERS             65
+#define        DHO_TFTP_SERVER_NAME            66
+#define        DHO_BOOTFILE_NAME               67
+#define        DHO_MOBILE_IP_HOME_AGENT        68
 #define DHO_SMTP_SERVER                        69
 #define DHO_POP_SERVER                 70
 #define DHO_NNTP_SERVER                        71
 #define DHO_WWW_SERVER                 72
 #define DHO_FINGER_SERVER              73
 #define DHO_IRC_SERVER                 74
+#define        DHO_STREETTALK_SERVER           75
+#define        DHO_STREETTALK_DA_SERVER        76
 #define DHO_DHCP_USER_CLASS_ID         77
 #define DHO_CLASSLESS_ROUTES           121
 #define DHO_END                                255

Modified: stable/6/sbin/dhclient/tables.c
==============================================================================
--- stable/6/sbin/dhclient/tables.c     Sun Oct 26 19:22:10 2008        
(r184296)
+++ stable/6/sbin/dhclient/tables.c     Sun Oct 26 19:28:04 2008        
(r184297)
@@ -387,13 +387,25 @@ unsigned char dhcp_option_default_priori
        DHO_FONT_SERVERS,
        DHO_X_DISPLAY_MANAGER,
        DHO_DHCP_PARAMETER_REQUEST_LIST,
+       DHO_NISPLUS_DOMAIN,
+       DHO_NISPLUS_SERVERS,
+       DHO_TFTP_SERVER_NAME,
+       DHO_BOOTFILE_NAME,
+       DHO_MOBILE_IP_HOME_AGENT,
+       DHO_SMTP_SERVER,
+       DHO_POP_SERVER,
+       DHO_NNTP_SERVER,
+       DHO_WWW_SERVER,
+       DHO_FINGER_SERVER,
+       DHO_IRC_SERVER,
+       DHO_STREETTALK_SERVER,
+       DHO_STREETTALK_DA_SERVER,
 
        /* Presently-undefined options... */
-       62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
-       78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
-       93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
-       107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
-       119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+       62, 63, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+       92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
+       106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
+       118, 119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130,
        131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
        143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
        155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to