1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-14 15:21:37 +03:00
systemd/src/libsystemd-network
Umut Tezduyar Lindskog b5db00e52e sd-ipv4ll/networkd: generate predictable addresses
Increase the chance of using the same link local address between reboots. The
pseudo random sequence of addresses we attempt is now seeded with data that is
very likely to stay the same between reboots, but at the same time be unique
to the specific machine/nic.

First we try to use the ID_NET_NAME_* data from the udev db combined with the
machin-id, which is guaranteed to be unique and persistent, if available. If
that is not possible (e.g., in containers where we don't have access to the
udev db) we fallback to using the MAC address of the interface, which is
guaranteed to be unique, and likely to be persistent.

[tomegun: three minor changes:

 - don't expose HASH_KEY in the siphash24 header
 - get rid of some compile-warnings (and some casts at the same time),
   by using uint8_t[8] rather than uint64_t in the api
 - added commit message]
2014-03-21 20:24:10 +01:00
..
dhcp-internal.h libsystemd-network: Export checksum function to test case 2014-03-19 10:52:40 +02:00
dhcp-lease-internal.h sd-dhcp-client: add fallback subnet masks 2014-03-21 17:52:42 +01:00
dhcp-network.c util: replace close_nointr_nofail() by a more useful safe_close() 2014-03-18 19:31:34 +01:00
dhcp-option.c
dhcp-packet.c libsystemd-network: Export checksum function to test case 2014-03-19 10:52:40 +02:00
dhcp-protocol.h sd-dhcp-lease: add Root Path support 2014-03-03 16:48:02 +01:00
ipv4ll-internal.h sd-network: IPv4 link-local support [v2] 2014-03-03 23:24:34 +01:00
ipv4ll-network.c util: replace close_nointr_nofail() by a more useful safe_close() 2014-03-18 19:31:34 +01:00
ipv4ll-packet.c sd-network: IPv4 link-local support [v2] 2014-03-03 23:24:34 +01:00
Makefile
sd-dhcp-client.c sd-dhcp-client/sd-ipv4ll: allow mac address to be updated at any time 2014-03-21 18:36:32 +01:00
sd-dhcp-lease.c sd-dhcp-client: add fallback subnet masks 2014-03-21 17:52:42 +01:00
sd-ipv4ll.c sd-ipv4ll/networkd: generate predictable addresses 2014-03-21 20:24:10 +01:00
test-dhcp-client.c libsystemd-dhcp: Update client test case for client id and end option 2014-03-20 10:56:29 +02:00
test-dhcp-option.c