diff options
author | Patrik Flykt <Patrik.Flykt@linux.intel.com> | 2014-06-26 16:18:43 +0300 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-06-29 15:18:21 +0200 |
commit | 68ceb9df6a39a7f86ffc3cf8266ca677a5d5271b (patch) | |
tree | e9cc615604eb921ce54bdf1bdcb9bf4a9a1d9f14 /src/network/networkd-address.c | |
parent | 7c16313f11e3953f3fe4dbf544f2d36f58d14138 (diff) |
sd-dhcp-client/networkd: set lifetimes for IPv4 addresses
Note that /proc/sys/net/ipv4/ip_dynaddr needs to be non-zero.
[tomegun: hook up DHCP renew events to increase the lifetime when necessary]
Diffstat (limited to 'src/network/networkd-address.c')
-rw-r--r-- | src/network/networkd-address.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index ce015004de..9c3e0e3376 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -360,6 +360,14 @@ int address_configure(Address *address, Link *link, } } + r = sd_rtnl_message_append_cache_info(req, IFA_CACHEINFO, + &address->cinfo); + if (r < 0) { + log_error("Could not append IFA_CACHEINFO attribute: %s", + strerror(-r)); + return r; + } + r = sd_rtnl_call_async(link->manager->rtnl, req, callback, link, 0, NULL); if (r < 0) { log_error("Could not send rtnetlink message: %s", strerror(-r)); |