lime-packages icon indicating copy to clipboard operation
lime-packages copied to clipboard

Replacing dnsmasq DHCP with odhcpd

Open AguTrachta opened this issue 5 months ago • 3 comments

We are starting to investigate this task for the GSoC and I'm opening this issue for anyone who wants to add and mention PRs / Issues or comment anything new that helps with this.

This issue can be a continuation of #294

AguTrachta avatar Jun 11 '25 13:06 AguTrachta

More info on this project: https://projects.freifunk.net/#/projects?project=simplify_libremesh_and_get_it_closer_to_openwrt

https://summerofcode.withgoogle.com/programs/2025/projects/NivhKPOA

https://blog.freifunk.net/2025/06/02/simplifying-libremesh-with-openwrt-native-solutions/

In short the idea is to get as close as possible to OpenWrt. Ideally, LibreMesh should be possible to install on top of plain OpenWrt using OPKG, without the need to include too many tools not included in the default OpenWrt packages selection, like the full dnsmasq.

ilario avatar Jun 11 '25 16:06 ilario

@ilario does odhcpd have some way to share leases in mesh? o do you think that we should use shared-state for this?

AguTrachta avatar Jun 18 '25 14:06 AguTrachta

I think you should use something like shared-state, yes. What needs to be found out is how to tell odhcpd that there a new lease has been issued by another node. I recall that @dangowrt implemented that but cannot remember how.

ilario avatar Jun 18 '25 17:06 ilario

Ok so after analyzing all the info, I propose next: creating a package like shared-state-odhcpd_leases/ where I think there are 2 paths, one is using a publisher with uci default configuration, similar to shared-state-bat_hosts, or creating a process with init.d where we use inotify as proposed in #294

the flow idea is that when local node odhcpd gets a new lease, with shared state we deliver that info with add_lease to the other nodes via ubus

What do you think about this? is there any other option?

AguTrachta avatar Jun 19 '25 15:06 AguTrachta

Sorry for taking so long to answer.

Ok so after analyzing all the info, I propose next: creating a package like shared-state-odhcpd_leases/

Good!

where I think there are 2 paths, one is using a publisher with uci default configuration, similar to shared-state-bat_hosts

Yess, this is the standard shared-state way.

or creating a process with init.d where we use inotify as proposed in #294

I would leave that to shared-state developers like @G10h4ck or @javierbrk (also, I have no idea how that works now). Anyway, the periodic execution seems enough to me, no need to use inotify for executing shared-state exactly as soon as a new lease gets granted, no?

the flow idea is that when local node odhcpd gets a new lease, with shared state we deliver that info with add_lease to the other nodes via ubus

Yess, this would be amazing :)

@javierbrk @G10h4ck Do you know if shared-state can give you information just about new lines that just appeared?

What do you think about this? is there any other option?

This one is very good :) No, no idea of other options.

ilario avatar Jun 29 '25 12:06 ilario