summaryrefslogtreecommitdiff
path: root/src/rfc2131.c
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-16 01:13:16 +0900
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-16 01:13:16 +0900
commitb00ee063105c01fcc744c3e4ccc466e9fd93562d (patch)
tree109abf0a51eb46e3194cc8d3dd980d406e7c67e2 /src/rfc2131.c
parentfcd16d9cfa7ae66560b8df5b7d3e9d954bc14296 (diff)
downloaddnsmasq-b00ee063105c01fcc744c3e4ccc466e9fd93562d.tar.gz
dnsmasq-b00ee063105c01fcc744c3e4ccc466e9fd93562d.tar.bz2
dnsmasq-b00ee063105c01fcc744c3e4ccc466e9fd93562d.zip
Diffstat (limited to 'src/rfc2131.c')
-rw-r--r--src/rfc2131.c10
1 files changed, 5 insertions, 5 deletions
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);