diff options
author | Jinkun Jang <jinkun.jang@samsung.com> | 2013-03-16 01:13:16 +0900 |
---|---|---|
committer | Jinkun Jang <jinkun.jang@samsung.com> | 2013-03-16 01:13:16 +0900 |
commit | b00ee063105c01fcc744c3e4ccc466e9fd93562d (patch) | |
tree | 109abf0a51eb46e3194cc8d3dd980d406e7c67e2 /src/rfc2131.c | |
parent | fcd16d9cfa7ae66560b8df5b7d3e9d954bc14296 (diff) | |
download | dnsmasq-b00ee063105c01fcc744c3e4ccc466e9fd93562d.tar.gz dnsmasq-b00ee063105c01fcc744c3e4ccc466e9fd93562d.tar.bz2 dnsmasq-b00ee063105c01fcc744c3e4ccc466e9fd93562d.zip |
merge with mastersubmit/tizen_2.1/20130424.231154submit/tizen/20130517.045851accepted/tizen_2.1/20130425.035315accepted/tizen/20130520.1017262.1b_releasetizen_2.1
Diffstat (limited to 'src/rfc2131.c')
-rw-r--r-- | src/rfc2131.c | 10 |
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); |