1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

Merge pull request #2661 from nwmcsween/nwmcsween

Include and internal struct member fixes.
This commit is contained in:
Daniel Mack 2016-02-19 12:29:23 +01:00
commit a972e1e0b3
8 changed files with 15 additions and 12 deletions

View File

@ -17,7 +17,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <bits/local_lim.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>

View File

@ -19,7 +19,7 @@
***/
#include <linux/filter.h>
#include <linux/if_ether.h>
#include <netinet/if_ether.h>
#include "fd-util.h"
#include "lldp-internal.h"

View File

@ -20,6 +20,7 @@
#include <errno.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/wait.h>
/* When we include libgen.h because we need dirname() we immediately
* undefine basename() since libgen.h defines it as a macro to the POSIX

View File

@ -19,6 +19,7 @@
#include <netinet/ether.h>
#include <netinet/icmp6.h>
#include <netinet/in.h>
#include <linux/if.h>
#include "sd-ndisc.h"
@ -76,15 +77,15 @@ static void ndisc_prefix_autonomous_handler(sd_ndisc *nd, const struct in6_addr
memcpy(((char *)&address->in_addr.in6) + 8, ((char *)&link->network->ipv6_token) + 8, 8);
else {
/* see RFC4291 section 2.5.1 */
address->in_addr.in6.__in6_u.__u6_addr8[8] = link->mac.ether_addr_octet[0];
address->in_addr.in6.__in6_u.__u6_addr8[8] ^= 1 << 1;
address->in_addr.in6.__in6_u.__u6_addr8[9] = link->mac.ether_addr_octet[1];
address->in_addr.in6.__in6_u.__u6_addr8[10] = link->mac.ether_addr_octet[2];
address->in_addr.in6.__in6_u.__u6_addr8[11] = 0xff;
address->in_addr.in6.__in6_u.__u6_addr8[12] = 0xfe;
address->in_addr.in6.__in6_u.__u6_addr8[13] = link->mac.ether_addr_octet[3];
address->in_addr.in6.__in6_u.__u6_addr8[14] = link->mac.ether_addr_octet[4];
address->in_addr.in6.__in6_u.__u6_addr8[15] = link->mac.ether_addr_octet[5];
address->in_addr.in6.s6_addr[8] = link->mac.ether_addr_octet[0];
address->in_addr.in6.s6_addr[8] ^= 1 << 1;
address->in_addr.in6.s6_addr[9] = link->mac.ether_addr_octet[1];
address->in_addr.in6.s6_addr[10] = link->mac.ether_addr_octet[2];
address->in_addr.in6.s6_addr[11] = 0xff;
address->in_addr.in6.s6_addr[12] = 0xfe;
address->in_addr.in6.s6_addr[13] = link->mac.ether_addr_octet[3];
address->in_addr.in6.s6_addr[14] = link->mac.ether_addr_octet[4];
address->in_addr.in6.s6_addr[15] = link->mac.ether_addr_octet[5];
}
address->prefixlen = prefixlen;
address->flags = IFA_F_NOPREFIXROUTE|IFA_F_MANAGETEMPADDR;

View File

@ -20,6 +20,7 @@
#include <net/if.h>
#include <sys/ioctl.h>
#include <linux/if_tun.h>
#include <netinet/if_ether.h>
#include "alloc-util.h"
#include "fd-util.h"

View File

@ -23,6 +23,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <unistd.h>
#include <linux/fs.h>

View File

@ -24,6 +24,7 @@
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/prctl.h>

View File

@ -18,7 +18,6 @@
***/
#include <netinet/ether.h>
#include <linux/netdevice.h>
#include "sd-netlink.h"