summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-07-14 20:17:11 +0200
committerTom Gundersen <teg@jklm.no>2015-07-14 20:17:11 +0200
commitdad8f7f2b6eb34bead17df9b3966da9c4b4d79db (patch)
tree3030a419d76726ba4493f14fb1f3938fca89c936 /src
parent9ecec7d7668b54fa87a0a5a637ec8f0ef911766b (diff)
parenta05185279bfc2420f60dc2a061d50bfcb646be70 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-network/sd-dhcp-lease.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c
index e9bf3c9fee..54417b3af3 100644
--- a/src/libsystemd-network/sd-dhcp-lease.c
+++ b/src/libsystemd-network/sd-dhcp-lease.c
@@ -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;