diff options
author | Samuel Tan <samueltan@google.com> | 2015-08-13 16:42:21 -0700 |
---|---|---|
committer | Samuel Tan <samueltan@google.com> | 2015-08-18 13:46:55 -0700 |
commit | 4eb4220b0441f724353b049e4deab95be99698d5 (patch) | |
tree | 43666118f17dce17d01ed2181fad66507756fe90 | |
parent | a3595821594453ea89ef8e6790927694b0a1adf1 (diff) | |
download | dhcpcd-6.8.2-4eb4220b0441f724353b049e4deab95be99698d5.tar.gz |
[PATCH] Be more permissive on NAKs
Cherry-picked from
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/
master/net-misc/dhcpcd/files/patches/dhcpcd-6.8.2-Be-more-permissive-on-
NAKs.patch.
Previously, we'd reject NAKs that did not include a server ID.
Since we'd only check that a server ID was present, but did not
validate it against any stored state, the test is merely pedantic.
Moreover, some DHCP servers (e.g. OpenBSD 4.6) send NAK messages
without a server ID. [1]
To improve compatibility with real-world DHCP servers, drop the
check for the presence of a server ID.
BUG: 22956197
Change-Id: I11515205b89affde5bc61eb95e6615db450d6176
Reviewed-on: https://chromium-review.googlesource.com/194972
-rw-r--r-- | dhcp.c | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -2748,14 +2748,6 @@ dhcp_handledhcp(struct interface *ifp, struct dhcp_message **dhcpp, } if (type == DHCP_NAK) { - /* For NAK, only check if we require the ServerID */ - if (has_option_mask(ifo->requiremask, DHO_SERVERID) && - get_option_addr(ifp->ctx, &addr, dhcp, DHO_SERVERID) == -1) - { - log_dhcp(LOG_WARNING, "reject NAK", ifp, dhcp, from); - return; - } - /* We should restart on a NAK */ log_dhcp(LOG_WARNING, "NAK:", ifp, dhcp, from); if ((msg = get_option_string(ifp->ctx, dhcp, DHO_MESSAGE))) { |