Index: bootp.c =================================================================== RCS file: /home/ncvs/src/lib/libstand/bootp.c,v retrieving revision 1.6 diff -u -r1.6 bootp.c --- bootp.c 9 Jan 2007 01:02:03 -0000 1.6 +++ bootp.c 2 May 2007 17:06:35 -0000 @@ -319,6 +319,12 @@ if (bcmp(vm_rfc1048, bp->bp_vend, sizeof(vm_rfc1048)) == 0) { if(vend_rfc1048(bp->bp_vend, sizeof(bp->bp_vend)) != 0) goto bad; + /* XXX DECRU Filter DHCP responses from MSFT hosts. */ + printf("bootprecv: XXX DECRU: Vendor class ID %s\n", vendclassid); + if(bcmp(vendclassid, "MSFT", 4) == 0) { + printf("XXX DECRU: DHCP response from MSFT vendor, ignoring\n"); + goto bad; + } } #ifdef BOOTP_VEND_CMU else if (bcmp(vm_cmu, bp->bp_vend, sizeof(vm_cmu)) == 0) @@ -385,6 +391,10 @@ bcopy(cp, &dhcp_serverip.s_addr, sizeof(dhcp_serverip.s_addr)); } + if (tag == TAG_CLASSID) { + strncpy(vendclassid, (char *)cp, sizeof(vendclassid)); + vendclassid[size] = '\0'; + } #endif cp += size; } Index: globals.c =================================================================== RCS file: /home/ncvs/src/lib/libstand/globals.c,v retrieving revision 1.2 diff -u -r1.2 globals.c --- globals.c 30 Sep 2001 22:28:01 -0000 1.2 +++ globals.c 2 May 2007 17:06:35 -0000 @@ -25,6 +25,8 @@ int hostnamelen; char domainname[FNAME_SIZE]; /* our DNS domain */ int domainnamelen; +char vendclassid[FNAME_SIZE]; /* Vendor Class Identifier */ +int vendclassidlen; char ifname[IFNAME_SIZE]; /* name of interface (e.g. "le0") */ struct in_addr myip; /* my ip address */ struct in_addr nameip; /* DNS server ip address */ Index: net.h =================================================================== RCS file: /home/ncvs/src/lib/libstand/net.h,v retrieving revision 1.5 diff -u -r1.5 net.h --- net.h 9 Jan 2007 01:02:04 -0000 1.5 +++ net.h 2 May 2007 17:06:35 -0000 @@ -74,6 +74,8 @@ extern int hostnamelen; extern char domainname[FNAME_SIZE]; extern int domainnamelen; +extern char vendclassid[FNAME_SIZE]; +extern int vendclassidlen; extern char ifname[IFNAME_SIZE]; /* All of these are in network order. */