From 8f61afd8d8e17c4e4970435e857d84465f019354 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Wed, 19 Feb 2014 19:44:06 +0100 Subject: sd-dhcp-client: fix mixup between raw and udp sockets --- src/libsystemd-dhcp/sd-dhcp-client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libsystemd-dhcp/sd-dhcp-client.c b/src/libsystemd-dhcp/sd-dhcp-client.c index d58755a603..ed81ab2d79 100644 --- a/src/libsystemd-dhcp/sd-dhcp-client.c +++ b/src/libsystemd-dhcp/sd-dhcp-client.c @@ -798,7 +798,7 @@ error: return 0; } -static int client_receive_message_raw(sd_event_source *s, int fd, +static int client_receive_message_udp(sd_event_source *s, int fd, uint32_t revents, void *userdata) { sd_dhcp_client *client = userdata; uint8_t buf[sizeof(DHCPMessage) + DHCP_MIN_OPTIONS_SIZE]; @@ -822,7 +822,7 @@ static int client_receive_message_raw(sd_event_source *s, int fd, time_now); } -static int client_receive_message_udp(sd_event_source *s, int fd, +static int client_receive_message_raw(sd_event_source *s, int fd, uint32_t revents, void *userdata) { sd_dhcp_client *client = userdata; uint8_t buf[sizeof(DHCPPacket) + DHCP_MIN_OPTIONS_SIZE]; @@ -876,7 +876,7 @@ int sd_dhcp_client_start(sd_dhcp_client *client) { client->start_time = now(CLOCK_MONOTONIC); client->secs = 0; - return client_initialize_events(client, client_receive_message_udp, + return client_initialize_events(client, client_receive_message_raw, client->start_time); } -- cgit v1.2.3-54-g00ecf