diff options
| author | Paul Saab <ps@FreeBSD.org> | 2000-04-21 04:58:51 +0000 |
|---|---|---|
| committer | Paul Saab <ps@FreeBSD.org> | 2000-04-21 04:58:51 +0000 |
| commit | 2339dc037f9ec88a3fa16a4087fc95a69ce6a45c (patch) | |
| tree | 8c887e16d85eeae76fe0e1137b9373392b47e4ad | |
| parent | 5d5b2077f18d989ec5a26298597fc000d2fc1a0b (diff) | |
Notes
| -rw-r--r-- | sys/boot/i386/libi386/pxe.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/boot/i386/libi386/pxe.c b/sys/boot/i386/libi386/pxe.c index e452bc4e8ef1..27c86083869e 100644 --- a/sys/boot/i386/libi386/pxe.c +++ b/sys/boot/i386/libi386/pxe.c @@ -159,8 +159,10 @@ pxe_init(void) return (0); /* look for "PXENV+" */ - if (bcmp((void *)pxenv_p->Signature, S_SIZE("PXENV+"))) + if (bcmp((void *)pxenv_p->Signature, S_SIZE("PXENV+"))) { + pxenv_p = NULL; return (0); + } /* make sure the size is something we can handle */ if (pxenv_p->Length > sizeof(*pxenv_p)) { @@ -307,7 +309,7 @@ pxe_close(struct open_file *f) static void pxe_print(int verbose) { - if (pxenv_p != NULL) { + if (pxe_p != NULL) { if (*bootplayer.Sname == '\0') { printf(" "IP_STR":%s\n", IP_ARGS(htonl(bootplayer.sip)), @@ -387,8 +389,11 @@ static int pxe_netif_probe(struct netif *nif, void *machdep_hint) { t_PXENV_UDP_OPEN *udpopen_p = (t_PXENV_UDP_OPEN *)scratch_buffer; - bzero(udpopen_p, sizeof(*udpopen_p)); + if (pxe_p == NULL) + return -1; + + bzero(udpopen_p, sizeof(*udpopen_p)); udpopen_p->src_ip = bootplayer.yip; pxe_call(PXENV_UDP_OPEN); |
