sd-network: IPv4 link-local support [v2]

Implements IPv4LL with respect to RFC 3927
(http://tools.ietf.org/rfc/rfc3927.txt) and integrates it
with networkd. Majority of the IPv4LL state machine is
taken from avahi (http://avahi.org/) project's autoip.

IPv4LL can be enabled by IPv4LL=yes under [Network]
section of .network file.

IPv4LL works independent of DHCP but if DHCP lease is
aquired, then LL address will be dropped.

[tomegun: removed a trailing newline and a compiler warning]
This commit is contained in:
Umut Tezduyar Lindskog
2014-03-03 23:24:34 +01:00
committed by Tom Gundersen
parent b6b8adbff4
commit 5c1d3fc93d
14 changed files with 1142 additions and 33 deletions
+14
View File
@@ -85,6 +85,20 @@ int sd_rtnl_message_route_set_dst_prefixlen(sd_rtnl_message *m, unsigned char pr
return 0;
}
int sd_rtnl_message_route_set_scope(sd_rtnl_message *m, unsigned char scope) {
struct rtmsg *rtm;
assert_return(m, -EINVAL);
assert_return(m->hdr, -EINVAL);
assert_return(rtnl_message_type_is_route(m->hdr->nlmsg_type), -EINVAL);
rtm = NLMSG_DATA(m->hdr);
rtm->rtm_scope = scope;
return 0;
}
int sd_rtnl_message_new_route(sd_rtnl *rtnl, sd_rtnl_message **ret,
uint16_t nlmsg_type, unsigned char rtm_family) {
struct rtmsg *rtm;