mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-11-05 19:03:31 +00:00
bee01292f8
Currently any error encountered in n_dhcp4_c_connection_dispatch_io()
causes a dispatch failure and interrupts the library state
machine. The recvmsg() on the socket can fail for different reasons;
one of these is for example that the UDP request previously sent got a
ICMP port-unreachable response. This can be reproduced in the
following way:
ip netns add ns1
ip link add veth0 type veth peer name veth1
ip link set veth1 netns ns1
ip link set veth0 up
cat > dhcpd.conf <<EOF
server-identifier 172.25.0.1;
max-lease-time 120;
default-lease-time 120;
subnet 172.25.0.0 netmask 255.255.255.0 {
range 172.25.0.100 172.25.0.200;
}
EOF
ip -n ns1 link set veth1 up
ip -n ns1 address add dev veth1 172.25.0.1/24
ip netns exec ns1 iptables -A INPUT -p udp --dport 67 -j REJECT
ip netns exec ns1 dhcpd -4 -cf dhcpd.conf -pf /tmp/dhcp-server.pid
If a client is started on veth0, it is able to obtain a lease despite
the firewall rule blocking DHCP, because dhcpd uses a packet
socket. Then it fails during the renewal because the recvmsg() fails:
dhcp4 (veth0): send REQUEST of 172.25.0.178 to 172.25.0.1
dhcp4 (veth0): error -111 dispatching events
dhcp4 (veth0): state changed bound -> fail
The client should consider such errors non fatal and keep running.
https://bugzilla.redhat.com/show_bug.cgi?id=1829178
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/486
(cherry picked from commit
|
||
---|---|---|
.. | ||
.cherryci | ||
src | ||
subprojects | ||
.editorconfig | ||
.gitmodules | ||
.travis.yml | ||
AUTHORS | ||
meson.build | ||
NEWS.md | ||
README.md |
n-dhcp4
Dynamic Host Configuration Protocol for IPv4
The n-dhcp4 project implements the IPv4 Dynamic Host Configuration Protocol as defined in RFC-2132+.
Project
- Website: https://nettools.github.io/n-dhcp4
- Bug Tracker: https://github.com/nettools/n-dhcp4/issues
- Mailing-List: https://groups.google.com/forum/#!forum/nettools-devel
Requirements
The requirements for this project are:
Linux kernel >= 3.19
libc
(e.g.,glibc >= 2.16
)
At build-time, the following software is required:
meson >= 0.41
pkg-config >= 0.29
Build
The meson build-system is used for this project. Contact upstream documentation for detailed help. In most situations the following commands are sufficient to build and install from source:
mkdir build
cd build
meson setup ..
ninja
meson test
ninja install
No custom configuration options are available.
Repository:
- web: https://github.com/nettools/n-dhcp4
- https:
https://github.com/nettools/n-dhcp4.git
- ssh:
git@github.com:nettools/n-dhcp4.git
License:
- Apache-2.0 OR LGPL-2.1-or-later
- See AUTHORS file for details.