Mercurial > unleashed > prev-conversion
changeset 18780:42f1a3a6052b
8754 loader: pass a "illumos" user-class in PXE dhcp request
author | Toomas Soome <tsoome@me.com> |
---|---|
date | Sat, 27 May 2017 14:46:56 +0300 |
parents | ea25b71c2dde |
children | d7f0c76ce9e0 |
files | usr/src/boot/lib/libstand/bootp.c usr/src/boot/lib/libstand/bootp.h |
diffstat | 2 files changed, 18 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/boot/lib/libstand/bootp.c Mon May 16 11:43:16 2016 +0300 +++ b/usr/src/boot/lib/libstand/bootp.c Sat May 27 14:46:56 2017 +0300 @@ -1,5 +1,3 @@ -/* $NetBSD: bootp.c,v 1.14 1998/02/16 11:10:54 drochner Exp $ */ - /* * Copyright (c) 1992 Regents of the University of California. * All rights reserved. @@ -16,7 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -31,8 +29,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * @(#) Header: bootp.c,v 1.4 93/09/11 03:13:51 leres Exp (LBL) */ #include <sys/cdefs.h> @@ -145,16 +141,22 @@ bp->bp_vend[7] = TAG_CLASSID; bp->bp_vend[8] = 9; bcopy("PXEClient", &bp->bp_vend[9], 9); - bp->bp_vend[18] = TAG_PARAM_REQ; - bp->bp_vend[19] = 7; - bp->bp_vend[20] = TAG_ROOTPATH; - bp->bp_vend[21] = TAG_HOSTNAME; - bp->bp_vend[22] = TAG_SWAPSERVER; - bp->bp_vend[23] = TAG_GATEWAY; - bp->bp_vend[24] = TAG_SUBNET_MASK; - bp->bp_vend[25] = TAG_INTF_MTU; - bp->bp_vend[26] = TAG_SERVERID; - bp->bp_vend[27] = TAG_END; + bp->bp_vend[18] = TAG_USER_CLASS; + /* len of each user class + number of user class */ + bp->bp_vend[19] = 8; + /* len of the first user class */ + bp->bp_vend[20] = 7; + bcopy("illumos", &bp->bp_vend[21], 7); + bp->bp_vend[28] = TAG_PARAM_REQ; + bp->bp_vend[29] = 7; + bp->bp_vend[30] = TAG_ROOTPATH; + bp->bp_vend[31] = TAG_HOSTNAME; + bp->bp_vend[32] = TAG_SWAPSERVER; + bp->bp_vend[33] = TAG_GATEWAY; + bp->bp_vend[34] = TAG_SUBNET_MASK; + bp->bp_vend[35] = TAG_INTF_MTU; + bp->bp_vend[36] = TAG_SERVERID; + bp->bp_vend[37] = TAG_END; } else bp->bp_vend[7] = TAG_END; #else
--- a/usr/src/boot/lib/libstand/bootp.h Mon May 16 11:43:16 2016 +0300 +++ b/usr/src/boot/lib/libstand/bootp.h Sat May 27 14:46:56 2017 +0300 @@ -108,6 +108,7 @@ #define TAG_T2 ((unsigned char) 59) #define TAG_CLASSID ((unsigned char) 60) #define TAG_CLIENTID ((unsigned char) 61) +#define TAG_USER_CLASS ((unsigned char) 77) #endif #define TAG_END ((unsigned char) 255)