-// Copyright (C) 2017-2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
" \"subnet\": \"192.0.1.0/24\",\n"
" \"valid-lifetime\": 7200\n"
" }\n"
-" ]\n"
+" ],\n"
+" \"valid-lifetime\": 7200\n"
" }\n"
" ],\n"
" \"subnet4\": [ ]\n"
-// Copyright (C) 2017-2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
" \"comment\": \"A shared network\",\n"
" \"name\": \"foo\",\n"
" \"option-data\": [ ],\n"
-" \"preferred-lifetime\": 0,\n"
+" \"preferred-lifetime\": 3600,\n"
" \"rapid-commit\": false,\n"
+" \"rebind-timer\": 1800,\n"
" \"relay\": {\n"
" \"ip-addresses\": [ ]\n"
" },\n"
+" \"renew-timer\": 900,\n"
" \"reservation-mode\": \"all\",\n"
" \"subnet6\": [\n"
" {\n"
" \"subnet\": \"2001:db1::/48\",\n"
" \"valid-lifetime\": 7200\n"
" }\n"
-" ]\n"
+" ],\n"
+" \"valid-lifetime\": 7200\n"
" }\n"
" ],\n"
" \"subnet6\": [ ]\n"
ElementPtr map = Network::toElement();
// Set preferred-lifetime
- map->set("preferred-lifetime",
- Element::create(static_cast<long long>
- (getPreferred().get())));
+ if (!getPreferred().unspecified()) {
+ map->set("preferred-lifetime",
+ Element::create(static_cast<long long>
+ (getPreferred().get())));
+ }
// Set interface-id
const OptionPtr& ifaceid = getInterfaceId();
-// Copyright (C) 2017-2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
" \"interface\": \"eth1\",\n"
" \"name\": \"dog\",\n"
" \"option-data\": [ ],\n"
- " \"preferred-lifetime\": 0,\n"
" \"rapid-commit\": false,\n"
" \"rebind-timer\": 200,\n"
" \"relay\": { \"ip-addresses\": [ ] },\n"
" \"interface\": \"eth0\",\n"
" \"name\": \"frog\",\n"
" \"option-data\": [ ],\n"
- " \"preferred-lifetime\": 0,\n"
" \"rapid-commit\": false,\n"
" \"relay\": { \"ip-addresses\": [ \"2001:db8:1::1\", \"2001:db8:1::2\" ] },\n"
" \"reservation-mode\": \"all\","