9fans archive / 1996 / 10 / 62 / prev next From: Jean Mehat jm@ai.... Subject: unixsrc/bootp Date: Fri, 18 Oct 1996 04:58:12 +0100 (MET) The bootp found in unixsrc dumps its core when debugging is enabled (on SunOs at least). More important, it cannot handle a vendor string long enough to contain my ip addresses. A quick patch follows. It might be useful to add a comment in bootptab specifying that the addresses in the vendor string are "netmask, file server, authentification server, router" in this order. The IP number that appear in the example bootptab are not very explanatory. diff bootp.bug/bootpd.h bootp.fix/bootpd.h 180c180 < byte vm_cookie[64], --- > byte vm_cookie[128], diff bootp.bug/bootp.h bootp.fix/bootp.h 42c42 < unsigned char bp_vend[64]; /* vendor-specific area */ --- > unsigned char bp_vend[128]; /* vendor-specific area */ diff bootp.bug/bootpd.c bootp.fix/bootpd.c 380c380 < report(LOG_ERR, "bind: %s\n", get_network_errmsg); --- > report(LOG_ERR, "bind: %s\n", get_network_errmsg()); 391c391 < report(LOG_ERR, "getsockname: %s\n", get_network_errmsg); --- > report(LOG_ERR, "getsockname: %s\n", get_network_errmsg()); 569c569 < report(LOG_INFO, "found %s %s\n", inet_ntoa(hp->iaddr.s_addr), --- > report(LOG_INFO, "found %s %s\n", "w.x.y.z" /* inet_ntoa(hp->iaddr.s_addr) */, 969c969 < fprintf(fp, "ip=%s:", inet_ntoa(hp->iaddr.s_addr)); --- > fprintf(fp, "ip=%s:", "w.x.y.z"/* inet_ntoa(hp->iaddr.s_addr)*/); 978c978 < fprintf(fp, "sm=%s:", inet_ntoa(hp->subnet_mask.s_addr)); --- > fprintf(fp, "sm=%s:", "w.x.y.z"/* inet_ntoa(hp->subnet_mask.s_addr)*/); --