openwrt / odhcpd

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
GNU General Public License v2.0
160 stars 96 forks source link

Not responding to DHCPv4 DHCPREQUEST #192

Closed brianjmurrell closed 1 year ago

brianjmurrell commented 1 year ago

I have odhcpd on openwrt 22.03.2 configured as the primary DHCPv4 server -- no dnsmasq at all:

config dhcp 'lan'
    option interface 'lan'
    option start '100'
    option limit '150'
    option leasetime '12h'
    option domain 'lan'
    option dhcpv4 'server'
    option dhcpv6 'server'
    option ra 'server'
    option ra_slaac '1'
    list ra_flags 'managed-config'
    list ra_flags 'other-config'

config odhcpd 'odhcpd'
    option maindhcp '1'
    option leasefile '/tmp/hosts/odhcpd'
    option leasetrigger '/usr/sbin/odhcpd-update'
    option loglevel '7'

config dhcp 'guest'
    option start '100'
    option leasetime '12h'
    option limit '150'
    option interface 'guest'
    option dhcpv4 'server'

But it's not responding to DHCPREQUEST packets from wireless clients:

# tcpdump -i br-lan -s 0 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br-lan, link-type EN10MB (Ethernet), capture size 262144 bytes
06:55:20.347971 c0:bd:c8:60:da:47 > ff:ff:ff:ff:ff:ff Null Unnumbered, xid, Flags [Response], length 6: 01 00
06:55:20.562304 IP6 :: > ff02::1:ff60:da47: ICMP6, neighbor solicitation, who has fe80::c2bd:c8ff:fe60:da47, length 24
06:55:20.562515 IP6 :: > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28
06:55:20.562683 IP6 :: > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28
06:55:20.570458 IP 0.0.0.0 > 224.0.0.22: igmp v3 report, 1 group record(s)
06:55:20.600799 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from c0:bd:c8:60:da:47, length 310
06:55:20.740873 IP6 fe80::c2bd:c8ff:fe60:da47 > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28
06:55:20.741069 IP6 fe80::c2bd:c8ff:fe60:da47 > ff02::2: ICMP6, router solicitation, length 16
06:55:20.742290 IP6 fe80::d66e:eff:fe64:62b6 > fe80::c2bd:c8ff:fe60:da47: ICMP6, router advertisement, length 88
06:55:20.900304 IP 0.0.0.0 > 224.0.0.22: igmp v3 report, 1 group record(s)
06:55:21.080057 IP6 fe80::c2bd:c8ff:fe60:da47 > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28
06:55:21.625756 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from c0:bd:c8:60:da:47, length 310
06:55:21.780283 IP6 fe80::d66e:eff:fe64:62b6 > ff02::1: ICMP6, router advertisement, length 88
06:55:23.455192 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from c0:bd:c8:60:da:47, length 310
06:55:25.796959 IP6 fe80::d66e:eff:fe64:62b6 > fe80::c2bd:c8ff:fe60:da47: ICMP6, neighbor solicitation, who has fe80::c2bd:c8ff:fe60:da47, length 32
06:55:25.799479 IP6 fe80::c2bd:c8ff:fe60:da47 > fe80::d66e:eff:fe64:62b6: ICMP6, neighbor advertisement, tgt is fe80::c2bd:c8ff:fe60:da47, length 24
06:55:27.527911 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from c0:bd:c8:60:da:47, length 310
06:55:30.816727 IP6 fe80::c2bd:c8ff:fe60:da47 > fe80::d66e:eff:fe64:62b6: ICMP6, neighbor solicitation, who has fe80::d66e:eff:fe64:62b6, length 32
06:55:30.816859 IP6 fe80::d66e:eff:fe64:62b6 > fe80::c2bd:c8ff:fe60:da47: ICMP6, neighbor advertisement, tgt is fe80::d66e:eff:fe64:62b6, length 24
06:55:35.897988 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from c0:bd:c8:60:da:47, length 310

The only thing in logread for the time period is:

Thu Dec 15 06:55:16 2022 kern.info kernel: [  473.186789] device br-lan entered promiscuous mode
Thu Dec 15 06:55:20 2022 daemon.info hostapd: wlan1-1: STA c0:bd:c8:60:da:47 IEEE 802.11: authenticated
Thu Dec 15 06:55:20 2022 daemon.info hostapd: wlan1-1: STA c0:bd:c8:60:da:47 IEEE 802.11: associated (aid 1)
Thu Dec 15 06:55:20 2022 daemon.notice hostapd: wlan1-1: AP-STA-CONNECTED c0:bd:c8:60:da:47
Thu Dec 15 06:55:20 2022 daemon.info hostapd: wlan1-1: STA c0:bd:c8:60:da:47 WPA: pairwise key handshake completed (RSN)
Thu Dec 15 06:55:20 2022 daemon.notice hostapd: EAPOL-4WAY-HS-COMPLETED c0:bd:c8:60:da:47
Thu Dec 15 06:55:20 2022 daemon.debug odhcpd[11757]: Received 16 Bytes from fe80::c2bd:c8ff:fe60:da47%lan@br-lan
Thu Dec 15 06:55:20 2022 daemon.debug odhcpd[11757]: Using a RA lifetime of 0 seconds on lan
Thu Dec 15 06:55:20 2022 daemon.notice odhcpd[11757]: Sending a RA on lan
Thu Dec 15 06:55:20 2022 daemon.debug odhcpd[11757]: Sent 88 bytes to fe80::c2bd:c8ff:fe60:da47%lan@br-lan
Thu Dec 15 06:55:21 2022 daemon.debug odhcpd[11757]: Using a RA lifetime of 0 seconds on lan
Thu Dec 15 06:55:21 2022 daemon.notice odhcpd[11757]: Sending a RA on lan
Thu Dec 15 06:55:21 2022 daemon.debug odhcpd[11757]: Sent 88 bytes to ff02::1%lan@br-lan
Thu Dec 15 06:55:38 2022 daemon.notice hostapd: wlan1-1: AP-STA-DISCONNECTED c0:bd:c8:60:da:47
Thu Dec 15 06:56:10 2022 user.info trm-2.1.0[6235]: no scan results on 'radio0'
Thu Dec 15 06:56:12 2022 kern.info kernel: [  530.055570] device br-lan left promiscuous mode

Despite the level 7 verbosity of logging.

The device is a TP-Link Archer C7 v2.

brianjmurrell commented 1 year ago

Any thoughts here? Is this a bug in odhcpd?

brianjmurrell commented 1 year ago

NVM. I had odhcpd-ipv6only installed instead of odhcpd.