diff options
author | Tom Gundersen <teg@jklm.no> | 2014-02-14 17:23:58 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-02-15 12:14:45 +0100 |
commit | 080ab27621e979e75f6bb1a055616f3d419f7ac3 (patch) | |
tree | 24fc20580762e553e984ae10a9677c03d47852ac /src/libsystemd-dhcp/sd-dhcp-client.c | |
parent | 818dc5e72af8a3eb772997188e2bd8ea616de844 (diff) |
sd-dhcp: network - don't hardcode ports
We want to reuse these functions for the server library too.
Diffstat (limited to 'src/libsystemd-dhcp/sd-dhcp-client.c')
-rw-r--r-- | src/libsystemd-dhcp/sd-dhcp-client.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsystemd-dhcp/sd-dhcp-client.c b/src/libsystemd-dhcp/sd-dhcp-client.c index bff35885f6..83d56a244e 100644 --- a/src/libsystemd-dhcp/sd-dhcp-client.c +++ b/src/libsystemd-dhcp/sd-dhcp-client.c @@ -324,6 +324,7 @@ static int client_send_request(sd_dhcp_client *client, uint16_t secs) { if (client->state == DHCP_STATE_RENEWING) { err = dhcp_network_send_udp_socket(client->fd, client->lease->server_address, + DHCP_PORT_SERVER, &request->dhcp, len - DHCP_IP_UDP_SIZE); } else { @@ -535,7 +536,8 @@ static int client_timeout_t1(sd_event_source *s, uint64_t usec, client->attempt = 1; r = dhcp_network_bind_udp_socket(client->index, - client->lease->address); + client->lease->address, + DHCP_PORT_CLIENT); if (r < 0) { client_stop(client, r); return 0; |