<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Chillispot Forum — Reload DNS settings for established DHCP connections]]></title>
		<link>http://www.chillispot.org/chilliforum/topic181-reload-dns-settings-for-established-dhcp-connections.html</link>
		<atom:link href="http://www.chillispot.org/chilliforum/feed-rss-topic181.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Reload DNS settings for established DHCP connections.]]></description>
		<lastBuildDate>Wed, 14 May 2008 15:36:46 +0000</lastBuildDate>
		<generator>PunBB 1.4.4</generator>
		<item>
			<title><![CDATA[Reload DNS settings for established DHCP connections]]></title>
			<link>http://www.chillispot.org/chilliforum/post453.html#p453</link>
			<description><![CDATA[<p>We found out, if chillispot receives the signal SIGHUP, the settings are reloaded but not written to the established DHCP connections.</p><p>So only new clients receive new DNS settungs but the established ones dosen&#039;t. <br />Here is a little patch to fix this behavior (<a href="http://bitswitcher.sourceforge.net/misc_patches/chillispot_dhcp_reload_on_hangup.patch">http://bitswitcher.sourceforge.net/misc … ngup.patch</a>):</p><div class="codebox"><pre><code>--- chillispot-1.1.0_orig/src/chilli.c    2006-09-24 19:48:25.000000000 +0200
+++ chillispot-1.1.0_new/src/chilli.c    2008-05-14 15:35:50.000000000 +0200
@@ -1081,6 +1081,21 @@
   return 0;
 }
 
+//dirty fix to set dns_settings to all dhcp connections
+//by Michael Finsterbusch &lt;fibu@users.sourceforge.net&gt;, Patrick Schmidt &lt;coolman1982@users.sourceforge.net&gt;
+void static dhcp_reload_dns_on_hangup(struct dhcp_t *dhcp,struct options_t options)
+{
+  struct dhcp_conn_t *conn;
+  struct dhcp_conn_t temp;
+  conn=dhcp-&gt;firstusedconn;
+  while(conn)
+  {
+    memcpy((void*)&amp;temp,(void*)conn,sizeof(struct dhcp_conn_t));
+    dhcp_set_addrs(conn, &amp;temp.hisip, &amp;options.mask, &amp;temp.ourip, &amp;options.dns1, &amp;options.dns2, options.domain);
+    conn=conn-&gt;next;
+  }
+}
+
 void static reprocess_options(int argc, char **argv) {
   struct options_t options2;
   sys_err(LOG_INFO, __FILE__, __LINE__, 0,
@@ -1121,12 +1136,18 @@
   options.eapolenable = options2.eapolenable; /* eapolenable */
   options.pidfile = options2.pidfile; /* pidfile */
 
+
   /* Reinit DHCP parameters */
+  
+
   (void) dhcp_set(dhcp, (options.debug &amp; DEBUG_DHCP),
           options.uamserver, options.uamserverlen, options.uamanydns,
           options.uamokip, options.uamokiplen,
           options.uamokaddr, options.uamokmask, options.uamoknetlen);
-  
+
+  //PATCH, reload dns_settings on all clients
+  (void) dhcp_reload_dns_on_hangup(dhcp,options);
+
   /* Reinit RADIUS parameters */
   (void) radius_set(radius, (options.debug &amp; DEBUG_RADIUS),
             &amp;options.radiusserver1, &amp;options.radiusserver2,</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (fibu)]]></author>
			<pubDate>Wed, 14 May 2008 15:36:46 +0000</pubDate>
			<guid>http://www.chillispot.org/chilliforum/post453.html#p453</guid>
		</item>
	</channel>
</rss>
