diff options
author | Tom Gundersen <teg@jklm.no> | 2016-05-21 23:00:32 +0200 |
---|---|---|
committer | Evgeny Vereshchagin <evvers@ya.ru> | 2016-05-22 00:00:32 +0300 |
commit | cf447cb62d01137f4cbd1cd14b83b88823542bbf (patch) | |
tree | 1e9440ae56f2b50025b7d10e82d07d9e9ce51ea6 /man/networkd.conf.xml | |
parent | 3da48d7aa9438029f45b84124b825634c2f091dc (diff) |
libsystemd-network: use recv(..., 0) instead of read(...) (#3317)
According to recv(2) these should be the same, but that is not true.
Passing a buffer of length 0 to read is defined to be a noop according
to read(2), but passing a buffer of length 0 to recv will discard the
pending pacet.
We can easily hit this as we allocate our buffer size depending on
the size of the incoming packet (using FIONREAD). As pointed out in
issue #3299 simply sending an empty UDP packet to the DHCP client
port will trigger a busy loop in networkd as we are polling on the
socket but never discarding the empty packet.
This reverts ad5ae47a0d159ea473c9730d7e0298a3e5d31cf6 but fixes the
same issue.
Diffstat (limited to 'man/networkd.conf.xml')
0 files changed, 0 insertions, 0 deletions