1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-07 17:17:44 +03:00

Merge pull request #538 from mischief/multiple-routers

sd-dhcp-lease: fix handling of multiple routers

We only support one router, but in case more than one is given, we now ignore subsequent ones, rather than fall over.
This commit is contained in:
Tom Gundersen 2015-07-14 20:17:11 +02:00
commit dad8f7f2b6

View File

@ -451,7 +451,8 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const uint8_t *option,
break;
case DHCP_OPTION_ROUTER:
lease_parse_be32(option, len, &lease->router);
if(len >= 4)
lease_parse_be32(option, 4, &lease->router);
break;