chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
489e4fb
)
sd-dhcp: silently ignore malformed packets
author
Tom Gundersen
<teg@jklm.no>
Sun, 16 Feb 2014 22:28:19 +0000
(23:28 +0100)
committer
Tom Gundersen
<teg@jklm.no>
Sun, 16 Feb 2014 22:28:19 +0000
(23:28 +0100)
This fixes a regression introduced in
e5002702
.
src/libsystemd-dhcp/sd-dhcp-client.c
patch
|
blob
|
history
diff --git
a/src/libsystemd-dhcp/sd-dhcp-client.c
b/src/libsystemd-dhcp/sd-dhcp-client.c
index 83d56a244eaa0d6eddd78526e9bda54be7c28d53..d58755a603d664aa23fb3a218b3fdb84edc7b4b0 100644
(file)
--- a/
src/libsystemd-dhcp/sd-dhcp-client.c
+++ b/
src/libsystemd-dhcp/sd-dhcp-client.c
@@
-710,11
+710,11
@@
static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message,
assert(message);
if (be32toh(message->xid) != client->xid)
- return
-EINVAL
;
+ return
0
;
if (memcmp(&message->chaddr[0], &client->mac_addr.ether_addr_octet,
ETHER_ADDR_LEN))
- return
-EINVAL
;
+ return
0
;
switch (client->state) {
case DHCP_STATE_SELECTING:
@@
-843,7
+843,7
@@
static int client_receive_message_udp(sd_event_source *s, int fd,
r = dhcp_packet_verify_headers(packet, BOOTREPLY, len);
if (r < 0)
- return
r
;
+ return
0
;
len -= DHCP_IP_UDP_SIZE;