diff options
| author | Roy Marples <roy@marples.name> | 2016-05-16 15:43:23 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-05-16 15:43:23 +0000 |
| commit | f434962c16325e822a78f2f119942a7e4f93b93c (patch) | |
| tree | bc11cd10ca9fb28a90739e4dba2de146daa77ba2 | |
| parent | f346c6f99e49e4c80963f27044d5b39ba42dd529 (diff) | |
| download | dhcpcd-f434962c16325e822a78f2f119942a7e4f93b93c.tar.xz | |
Only accept BOOTREPLY.
| -rw-r--r-- | dhcp.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2669,6 +2669,12 @@ dhcp_handledhcp(struct interface *ifp, struct bootp *bootp, size_t bootp_len, #define LOGDHCP(l, m) \ log_dhcp((l), (m), ifp, bootp, bootp_len, from, 1) + if (bootp->op != BOOTREPLY) { + logger(ifp->ctx, LOG_DEBUG, "%s: op (%d) is not BOOTREPLY", + ifp->name, bootp->op); + return; + } + /* Ensure packet is for us */ if (ifp->hwlen <= sizeof(bootp->chaddr) && memcmp(bootp->chaddr, ifp->hwaddr, ifp->hwlen)) |
