]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #9406 from yuwata/rfe-9228
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 23 Aug 2018 09:11:13 +0000 (11:11 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 23 Aug 2018 09:11:13 +0000 (11:11 +0200)
Trivial conflict solved in merge and include net/if_arp.h added.

1  2 
src/libsystemd-network/dhcp-identifier.c
src/network/networkd-link.c
src/network/networkd-link.h
src/network/networkd-manager.c
src/network/networkd-manager.h
src/network/networkd-network.c
src/network/networkd-network.h

index d1e929ba7b2db7bbfcf70a60555796dd79991b2e,a8ed98f29a9609529fa41483dfae1426b80649c6..531cf6783bfdb96aa296004306aa9ea25ed2477d
@@@ -1,6 -1,8 +1,9 @@@
  /* SPDX-License-Identifier: LGPL-2.1+ */
  
 -#include "libudev.h"
+ #include <linux/if_infiniband.h>
++#include <net/if_arp.h>
 +#include "sd-device.h"
  #include "sd-id128.h"
  
  #include "dhcp-identifier.h"
  #include "network-internal.h"
  #include "siphash24.h"
  #include "sparse-endian.h"
 -#include "udev-util.h"
  #include "virt.h"
  
- #define SYSTEMD_PEN 43793
- #define HASH_KEY SD_ID128_MAKE(80,11,8c,c2,fe,4a,03,ee,3e,d6,0c,6f,36,39,14,09)
+ #define SYSTEMD_PEN    43793
+ #define HASH_KEY       SD_ID128_MAKE(80,11,8c,c2,fe,4a,03,ee,3e,d6,0c,6f,36,39,14,09)
+ #define APPLICATION_ID SD_ID128_MAKE(a5,0a,d1,12,bf,60,45,77,a2,fb,74,1a,b1,95,5b,03)
+ #define USEC_2000       ((usec_t) 946684800000000) /* 2000-01-01 00:00:00 UTC */
  
  int dhcp_validate_duid_len(uint16_t duid_type, size_t duid_len) {
          struct duid d;
@@@ -69,10 -124,29 +124,29 @@@ int dhcp_identifier_set_duid_en(struct 
          return 0;
  }
  
+ int dhcp_identifier_set_duid_uuid(struct duid *duid, size_t *len) {
+         sd_id128_t machine_id;
+         int r;
+         assert(duid);
+         assert(len);
+         r = sd_id128_get_machine_app_specific(APPLICATION_ID, &machine_id);
+         if (r < 0)
+                 return r;
+         unaligned_write_be16(&duid->type, DUID_TYPE_UUID);
+         memcpy(&duid->raw.data, &machine_id, sizeof(machine_id));
+         *len = sizeof(duid->type) + sizeof(machine_id);
+         return 0;
+ }
  int dhcp_identifier_set_iaid(int ifindex, uint8_t *mac, size_t mac_len, void *_id) {
 -        /* name is a pointer to memory in the udev_device struct, so must
 -           have the same scope */
 -        _cleanup_(udev_device_unrefp) struct udev_device *device = NULL;
 +        /* name is a pointer to memory in the sd_device struct, so must
 +         * have the same scope */
 +        _cleanup_(sd_device_unrefp) sd_device *device = NULL;
          const char *name = NULL;
          uint64_t id;
  
Simple merge
Simple merge
Simple merge
index edaafb6a0663f704d564961665e9287a416f6be9,410e00da63829e432d106a3ac73f2ba9ba45dcde..fbfcdad3041bc5a76bbf57b84aa3417950522c67
@@@ -5,9 -5,10 +5,10 @@@
  
  #include "sd-bus.h"
  #include "sd-event.h"
+ #include "sd-id128.h"
  #include "sd-netlink.h"
  #include "sd-resolve.h"
 -#include "udev.h"
 +#include "libudev.h"
  
  #include "dhcp-identifier.h"
  #include "hashmap.h"
Simple merge
Simple merge