summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/dnsmasq.spec7
-rw-r--r--src/rfc2131.c10
2 files changed, 7 insertions, 10 deletions
diff --git a/packaging/dnsmasq.spec b/packaging/dnsmasq.spec
index 4045f59..31b8021 100644
--- a/packaging/dnsmasq.spec
+++ b/packaging/dnsmasq.spec
@@ -1,9 +1,9 @@
Name: dnsmasq
Summary: dnsmasq, DNS forwarder.
Version: 2.57
-Release: 6
+Release: 5
Group: TO_BE/FILLED_IN
-License: GPLv2
+License: TO BE FILLED IN
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: pkgconfig(dbus-1)
@@ -30,9 +30,6 @@ rm -rf %{buildroot}
%{_bindir}/dnsmasq
%changelog
-* Tue Jan 15 2013 Seungyoun Ju <sy39.ju@samsung.com> 2.57-6
-- Send the indication for DHCP connection every time
-
* Fri Nov 02 2012 Seungyoun Ju <sy39.ju@samsung.com> 2.57-5
- Default manifest file is added
diff --git a/src/rfc2131.c b/src/rfc2131.c
index 4f942b5..9218765 100644
--- a/src/rfc2131.c
+++ b/src/rfc2131.c
@@ -1,5 +1,4 @@
/* dnsmasq is Copyright (c) 2000-2011 Simon Kelley
- Copyright (c) 2012, 2013 Samsung Electronices Co., Ltd.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,9 +12,6 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-
- * Modifications by Samsung Electronices Co., Ltd.
- 1. ACTION_CONNECT is added to notify IP address assignment
*/
#include "dnsmasq.h"
@@ -101,6 +97,8 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
unsigned char pxe_uuid[17];
unsigned char *oui = NULL, *serial = NULL, *class = NULL;
+ static time_t old_time = 0;
+
subnet_addr.s_addr = override.s_addr = 0;
/* set tag with name == interface */
@@ -1269,7 +1267,9 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
override = lease->override;
log_packet("DHCPACK", &mess->yiaddr, emac, emac_len, iface_name, hostname, mess->xid);
- emit_dbus_signal(ACTION_CONNECT, lease, hostname);
+ if (difftime(now, old_time) > 7)
+ emit_dbus_signal(ACTION_CONNECT, lease, hostname);
+ old_time = now;
clear_packet(mess, end);
option_put(mess, end, OPTION_MESSAGE_TYPE, 1, DHCPACK);