diff options
author | Tom Gundersen <teg@jklm.no> | 2014-04-06 19:23:33 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-04-06 19:42:11 +0200 |
commit | 7429b07f822348dc5a87208ce107f5f6bf02656d (patch) | |
tree | ce9b61db02a34ba440dcc35385b9151e37754fee /src/libsystemd-network/sd-dhcp-client.c | |
parent | 0c79c68d93d721d37ba088fb50dbf07bb0d447e5 (diff) |
sd-dhcp-client: improve BPF
Try a bit harder to make the kernel drop packets not for us. This should reduce
the number of wakeups from n^2 to n in the number of dhcp clients, which admittedly
only makes a differenc in very extreme cases.
Diffstat (limited to 'src/libsystemd-network/sd-dhcp-client.c')
-rw-r--r-- | src/libsystemd-network/sd-dhcp-client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 722f862832..da41c478ea 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -593,7 +593,7 @@ static int client_start(sd_dhcp_client *client) { client->xid = random_u32(); - r = dhcp_network_bind_raw_socket(client->index, &client->link); + r = dhcp_network_bind_raw_socket(client->index, &client->link, client->xid); if (r < 0) { client_stop(client, r); @@ -636,7 +636,7 @@ static int client_timeout_t2(sd_event_source *s, uint64_t usec, void *userdata) client->state = DHCP_STATE_REBINDING; client->attempt = 1; - r = dhcp_network_bind_raw_socket(client->index, &client->link); + r = dhcp_network_bind_raw_socket(client->index, &client->link, client->xid); if (r < 0) { client_stop(client, r); return 0; |