NetworkManager r3968 - in trunk: . src/dnsmasq-manager
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3968 - in trunk: . src/dnsmasq-manager
- Date: Fri, 15 Aug 2008 15:06:44 +0000 (UTC)
Author: dcbw
Date: Fri Aug 15 15:06:44 2008
New Revision: 3968
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3968&view=rev
Log:
2008-08-15 Dan Williams <dcbw redhat com>
* src/dnsmasq-manager/nm-dnsmasq-manager.c
- (create_dm_cmd_line): send the right router address
Modified:
trunk/ChangeLog
trunk/src/dnsmasq-manager/nm-dnsmasq-manager.c
Modified: trunk/src/dnsmasq-manager/nm-dnsmasq-manager.c
==============================================================================
--- trunk/src/dnsmasq-manager/nm-dnsmasq-manager.c (original)
+++ trunk/src/dnsmasq-manager/nm-dnsmasq-manager.c Fri Aug 15 15:06:44 2008
@@ -236,6 +236,7 @@
const NMSettingIP4Address *tmp;
struct in_addr addr;
char buf[INET_ADDRSTRLEN + 1];
+ char localaddr[INET_ADDRSTRLEN + 1];
dm_binary = nm_find_dnsmasq ();
if (!dm_binary) {
@@ -259,12 +260,12 @@
s = g_string_new ("--listen-address=");
addr.s_addr = tmp->address;
- if (!inet_ntop (AF_INET, &addr, &buf[0], INET_ADDRSTRLEN)) {
+ if (!inet_ntop (AF_INET, &addr, &localaddr[0], INET_ADDRSTRLEN)) {
nm_warning ("%s: error converting IP4 address 0x%X",
__func__, ntohl (addr.s_addr));
goto error;
}
- g_string_append (s, buf);
+ g_string_append (s, localaddr);
nm_cmd_line_add_string (cmd, s->str);
g_string_free (s, TRUE);
@@ -294,7 +295,11 @@
nm_cmd_line_add_string (cmd, s->str);
g_string_free (s, TRUE);
- nm_cmd_line_add_string (cmd, "--dhcp-option=option:router,0.0.0.0");
+ s = g_string_new ("--dhcp-option=option:router,");
+ g_string_append (s, localaddr);
+ nm_cmd_line_add_string (cmd, s->str);
+ g_string_free (s, TRUE);
+
nm_cmd_line_add_string (cmd, "--dhcp-lease-max=50");
s = g_string_new ("--pid-file=");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]