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/test-dhcp-client.c | |
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/test-dhcp-client.c')
-rw-r--r-- | src/libsystemd-network/test-dhcp-client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/test-dhcp-client.c b/src/libsystemd-network/test-dhcp-client.c index 450b6d4d3c..7cbe10d5a7 100644 --- a/src/libsystemd-network/test-dhcp-client.c +++ b/src/libsystemd-network/test-dhcp-client.c @@ -196,7 +196,7 @@ int dhcp_network_send_raw_socket(int s, const union sockaddr_union *link, return 575; } -int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, uint32_t id) +int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, uint32_t id, struct ether_addr mac) { if (socketpair(AF_UNIX, SOCK_STREAM, 0, test_fd) < 0) return -errno; |