0.17-jumpstart.patch 1.1 KB

1234567891011121314151617181920212223242526
  1. diff -urN netkit-bootparamd-0.17.old/rpc.bootparamd/rpc.bootparamd.c netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c
  2. --- netkit-bootparamd-0.17.old/rpc.bootparamd/rpc.bootparamd.c 2000-07-22 12:23:56.000000000 -0400
  3. +++ netkit-bootparamd-0.17/rpc.bootparamd/rpc.bootparamd.c 2004-09-13 17:42:43.000000000 -0400
  4. @@ -136,11 +136,16 @@
  5. strncpy(path, where, sizeof(path));
  6. path[sizeof(path)-1] = 0;
  7. he = gethostbyname(hostname);
  8. - if (!he) goto failed;
  9. - bcopy( he->h_addr, &res.server_address.bp_address_u.ip_addr, 4);
  10. - res.server_name = hostname;
  11. - res.server_path = path;
  12. - res.server_address.address_type = IP_ADDR_TYPE;
  13. + if (!he) { /* jumpstart parameters are not valid hosts */
  14. + res.server_name = hostname;
  15. + res.server_path = path;
  16. + bzero(&res.server_address.bp_address_u.ip_addr,4);
  17. + } else {
  18. + bcopy( he->h_addr, &res.server_address.bp_address_u.ip_addr, 4);
  19. + res.server_name = hostname;
  20. + res.server_path = path;
  21. + res.server_address.address_type = IP_ADDR_TYPE;
  22. + }
  23. }
  24. else { /* special for dump, answer with null strings */
  25. if (!strcmp(getfile->file_id, "dump")) {