diff options
author | Vinay Kulkarni <vskibum@gmail.com> | 2016-03-30 16:33:55 -0700 |
---|---|---|
committer | Vinay Kulkarni <vskibum@gmail.com> | 2016-03-30 16:33:55 -0700 |
commit | 413708d106afb5ec36464c3fad56f081373320e0 (patch) | |
tree | 706d63a6190036d3015d3100d0935e1a016fbab6 /src/libsystemd-network/network-internal.c | |
parent | 1eb963a32ddd2147057178cc230d919b66a90db7 (diff) |
DHCP DUID, IAID configuration options
Diffstat (limited to 'src/libsystemd-network/network-internal.c')
-rw-r--r-- | src/libsystemd-network/network-internal.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c index cb7252bbeb..0e2d757b2b 100644 --- a/src/libsystemd-network/network-internal.c +++ b/src/libsystemd-network/network-internal.c @@ -335,6 +335,35 @@ int config_parse_hwaddr(const char *unit, return 0; } +int config_parse_iaid(const char *unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { + uint32_t iaid; + int r; + + assert(filename); + assert(lvalue); + assert(rvalue); + assert(data); + + r = safe_atou32(rvalue, &iaid); + if (r < 0) { + log_syntax(unit, LOG_ERR, filename, line, 0, "Unable to read IAID: %s", rvalue); + return r; + } + + *((uint32_t *)data) = iaid; + + return 0; +} + void serialize_in_addrs(FILE *f, const struct in_addr *addresses, size_t size) { unsigned i; |