Joan Lledó, le lun. 06 avril 2026 14:00:02 +0200, a ecrit: > From: Joan Lledó <[email protected]> > > Required by dhcpcd > --- > pfinet/iioctl-ops.c | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > > diff --git a/pfinet/iioctl-ops.c b/pfinet/iioctl-ops.c > index 09f30d56..dea9a443 100644 > --- a/pfinet/iioctl-ops.c > +++ b/pfinet/iioctl-ops.c > @@ -503,7 +503,23 @@ S_iioctl_siocdifaddr (struct sock_user *user, > const ifname_t ifnam, > sockaddr_t addr) > { > - return EOPNOTSUPP; > + kern_return_t err; > + struct sockaddr_in sin; > + sin.sin_family = AF_INET; > + > + /* > + * To delete an address, we set it to the values we use to initialize > + * an iface when no address is provided: 0.0.0.0/8 > + */ > + sin.sin_addr.s_addr = INADDR_ANY; > + sin.sin_addr.s_addr = 0xFF;
You need to call htonl rather than assuming little-endian. Also, you can use IN_CLASSA_NET instead of hardcoding it :) Samuel
