summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/dhcp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mdk-stage1/dhcp.c b/mdk-stage1/dhcp.c
index 616d60f20..e2013994a 100644
--- a/mdk-stage1/dhcp.c
+++ b/mdk-stage1/dhcp.c
@@ -381,6 +381,10 @@ static int handle_transaction(int s, struct bootp_request * breq, struct bootp_r
breq->secs = 0;
sin = socket(AF_PACKET, SOCK_DGRAM, ntohs(ETH_P_IP));
+ if (sin < 0) {
+ log_perror("af_packet socket");
+ return -1;
+ }
while (retry <= MAX_ARP_RETRIES) {
i = sizeof(*breq);