On Sun, Oct 24, 2021 at 02:18:39PM +0200, Florian Obser wrote:
> On 2021-10-24 13:53 +09, Roc Vallès <valles...@gmail.com> wrote:
> > Sysupgraded my 6.9 personal server to 7.0 tonight. Only IPv6 came up
> > (which I have a custom dhcp setup for, as required by my host).
> >
> > On the daemon log, this shows up:
> > Oct 24 02:04:17 momoyo dhcpleased[92859]: parse_dhcp: invalid ports
> > used 107.189.0.254:52260 -> 255.255.255.255:68
> >
> > What I understand from this is that it doesn't like ephemeral ports
> > used by dhcp servers.
> 
> Nothing in RFC 2131 says that the dhcp server MUST / SHOULD send answers
> from port 67. I guess that check was a bit overenthusiastic.

Yes, it just needs to go to the client port 68.

Can you try this diff and see if dhcpleased(8) works in your setup?


Index: engine.c
===================================================================
RCS file: /cvs/src/sbin/dhcpleased/engine.c,v
retrieving revision 1.27
diff -u -p -r1.27 engine.c
--- engine.c    15 Sep 2021 15:18:23 -0000      1.27
+++ engine.c    26 Oct 2021 16:47:01 -0000
@@ -830,13 +830,6 @@ parse_dhcp(struct dhcpleased_iface *ifac
                    ntohs(udp->uh_sport), hbuf_dst, ntohs(udp->uh_dport));
        }
 
-       if (ntohs(udp->uh_sport) != SERVER_PORT ||
-           ntohs(udp->uh_dport) != CLIENT_PORT) {
-               log_warnx("%s: invalid ports used %s:%d -> %s:%d", __func__,
-                   hbuf_src, ntohs(udp->uh_sport),
-                   hbuf_dst, ntohs(udp->uh_dport));
-               return;
-       }
        if (rem < sizeof(*dhcp_hdr))
                goto too_short;
 

Reply via email to