[Chilli] Layer3: help with connections / dhcp connections
Michele Bergonzoni
bergonz at labs.it
Wed Nov 27 17:52:25 UTC 2013
> If it isn't a configuration switch that I'm missing, I am willing to
> change the source
I forced just one "dhcp connection", with this simple patch, that
appears to work for me. It is not perfect, because it seems to me that
it can actually use the wrong MAC address to talk to the client, but at
least it "usually" works.
THis is relative to current SVN, with my previous EDNS patch applied and
one more patch that I'll share shortly.
Regards,
Bergonz
Index: src/dhcp.c
===================================================================
--- src/dhcp.c (revision 485)
+++ src/dhcp.c (working copy)
@@ -617,6 +617,13 @@
struct dhcp_conn_t *p;
uint32_t hash;
+#ifdef ENABLE_LAYER3
+ if (_options.layer3 && this->firstusedconn){
+ /* We want just one dhcp connection, so reuse the same */
+ *conn = this->firstusedconn;
+ return 0;
+ }
+#endif
/* Find in hash table */
hash = dhcp_hash(hwaddr) & this->hashmask;
for (p = this->hash[hash]; p; p = p->nexthash) {
More information about the Chilli
mailing list