[OpenWrt-Devel] odhcpd problem

Hans Dedecker dedeckeh at gmail.com
Fri Apr 19 13:28:35 EDT 2019


Hi,

On Fri, Apr 19, 2019 at 7:36 AM e9hack <e9hack at gmail.com> wrote:
>
> Hi,
>
> I've trouble with this patch:
>
> router: improve code readability
> No functional changes; just improve code readabilty in send_router_advert()
>
> I'm using odhcpd a little bit modified. Odhcpd does not provide dhcpv6, but it sends the managed flag that dhcpv6 is
> available. Dhcpv6 is done by dnsmasq. I'm using this patch:
>
> --- a/src/router.c      2018-06-26 14:20:53.000000000 +0200
> +++ b/src/router.c      2018-07-06 09:45:14.473544050 +0200
> @@ -379,12 +379,11 @@
>         if (hlim > 0)
>                 adv.h.nd_ra_curhoplimit = hlim;
>
> -       if (iface->dhcpv6) {
> +       if (iface->dhcpv6)
>                 adv.h.nd_ra_flags_reserved = ND_RA_FLAG_OTHER;
>
> -               if (iface->ra_managed >= RA_MANAGED_MFLAG)
> -                       adv.h.nd_ra_flags_reserved |= ND_RA_FLAG_MANAGED;
> -       }
> +       if (iface->ra_managed >= RA_MANAGED_MFLAG)
> +               adv.h.nd_ra_flags_reserved |= ND_RA_FLAG_OTHER | ND_RA_FLAG_MANAGED;
>
>         if (iface->route_preference < 0)
>                 adv.h.nd_ra_flags_reserved |= ND_RA_PREF_LOW;
>
> After the code improvement, my Raspberypi's are kicked out from network after a short time. They running headless.
> Before this occurs, I can check the dhcpcd status:
>
> pi at raspberrypi:~ $ sudo systemctl status dhcpcd
> â dhcpcd.service - dhcpcd on all interfaces
>    Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
>    Active: active (running) since Thu 2019-04-18 21:07:52 CEST; 9h ago
>   Process: 380 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS)
>  Main PID: 392 (dhcpcd)
>       CPU: 20.817s
>    CGroup: /system.slice/dhcpcd.service
>            ââ392 /sbin/dhcpcd -q -b
>            ââ482 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
>
> Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long
> Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long
> Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long
> Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long
> Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long
> Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long
> Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long
> Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long
> Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long
> Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long
> Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long
> Apr 19 07:05:05 raspberrypi dhcpcd[392]: eth0: dhcp_envoption 31.0/2: Argument list too long
>
> What does this 'eth0: dhcp_envoption 31.0/2: Argument list too long' mean and what is the reason for this?
>
> If they are kicked out, access is not longer possible, even if I revert odhcpd to the previous version and reconnect the
> lan cables. I must power off the pi's.
>
> If the pi's are running well, this is the dhcpcd status:
>
> pi at raspberrypi:~ $ sudo systemctl status dhcpcd
> â dhcpcd.service - dhcpcd on all interfaces
>    Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
>    Active: active (running) since Fri 2019-04-19 07:29:08 CEST; 14s ago
>   Process: 1023 ExecStop=/sbin/dhcpcd -x (code=exited, status=1/FAILURE)
>   Process: 1036 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS)
>  Main PID: 1038 (dhcpcd)
>       CPU: 351ms
>    CGroup: /system.slice/dhcpcd.service
>            ââ1038 /sbin/dhcpcd -q -b
>            ââ1055 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
>
> Apr 19 07:29:08 raspberrypi dhcpcd[1038]: eth0: Router Advertisement from fe80::xxxx:xxxx:xxxx:xxxx
> Apr 19 07:29:08 raspberrypi dhcpcd[1038]: eth0: adding address 2003:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64
> Apr 19 07:29:08 raspberrypi dhcpcd[1038]: eth0: adding address fde9:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64
> Apr 19 07:29:08 raspberrypi dhcpcd[1038]: eth0: adding route to 2003:xxxx:xxxx:xxxx::/64
> Apr 19 07:29:08 raspberrypi dhcpcd[1038]: eth0: adding route to fde9:xxxx:xxxx:xxxx::/64
> Apr 19 07:29:08 raspberrypi dhcpcd[1038]: eth0: adding default route via fe80::xxxx:xxxx:xxxx:xxxx
> Apr 19 07:29:08 raspberrypi dhcpcd[1038]: eth0: confirming prior DHCPv6 lease
> Apr 19 07:29:09 raspberrypi dhcpcd[1038]: eth0: REPLY6 received from fe80::xxxx:xxxx:xxxx:xxxx
> Apr 19 07:29:09 raspberrypi dhcpcd[1038]: eth0: adding address fec0::ffff:0:0:ffff:80/128
> Apr 19 07:29:09 raspberrypi dhcpcd[1038]: eth0: renew in 86400, rebind in 151200, expire in 172800 seconds
> [1]+  Done                    sudo systemctl restart dhcpcd
The issue is fixed in commit
https://git.openwrt.org/?p=project/odhcpd.git;a=commit;h=6633efeb8196853503305c2714ba6830c8d9c70b

Hans
>
> Regards,
> Hartmut

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list