diff options
author | Michal Sekletar <msekleta@redhat.com> | 2014-06-19 15:14:14 +0200 |
---|---|---|
committer | Michal Sekletar <msekleta@redhat.com> | 2014-07-07 12:17:55 +0200 |
commit | 58587a7a0c3bf5595190486781d3bbc00654c6ef (patch) | |
tree | 891be26a4bdfdfe7ad3be79396083e545752ee3a /src/libsystemd-network/dhcp-internal.h | |
parent | 31cda3d1759dee3e48c8ed4a949d99f041bdca1c (diff) |
dhcp-network: add check for DHCP.chaddr
Check that received DHCP packets actually include our MAC address in
chaddr field. BPF interpreter has 32 bit wide registers but MAC address
is 48 bits long so we have to do check in two steps.
Diffstat (limited to 'src/libsystemd-network/dhcp-internal.h')
-rw-r--r-- | src/libsystemd-network/dhcp-internal.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-network/dhcp-internal.h b/src/libsystemd-network/dhcp-internal.h index 6f6f1218d9..1069c8a03b 100644 --- a/src/libsystemd-network/dhcp-internal.h +++ b/src/libsystemd-network/dhcp-internal.h @@ -24,13 +24,14 @@ #include <stdint.h> #include <linux/if_packet.h> +#include <net/ethernet.h> #include "socket-util.h" #include "sd-dhcp-client.h" #include "dhcp-protocol.h" -int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, uint32_t xid); +int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, uint32_t xid, struct ether_addr mac_addr); int dhcp_network_bind_udp_socket(be32_t address, uint16_t port); int dhcp_network_send_raw_socket(int s, const union sockaddr_union *link, const void *packet, size_t len); |