]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't spam the log as much when constantly using IPV4LL addresses.
authorRoy Marples <roy@marples.name>
Fri, 9 Nov 2007 16:55:00 +0000 (16:55 +0000)
committerRoy Marples <roy@marples.name>
Fri, 9 Nov 2007 16:55:00 +0000 (16:55 +0000)
arp.c
client.c

diff --git a/arp.c b/arp.c
index b797b65578798474859ee38e46448cb4340b33c3..05541856b8164b6e991382983e2be03f7d89d530 100644 (file)
--- a/arp.c
+++ b/arp.c
@@ -100,8 +100,10 @@ int arp_claim (interface_t *iface, struct in_addr address)
                return (0);
        }
 
-       logger (LOG_INFO, "checking %s is available on attached networks",
-                       inet_ntoa (address));
+       if (! IN_LINKLOCAL (ntohl (iface->previous_address.s_addr)) &&
+               ! IN_LINKLOCAL (ntohl (address.s_addr)))
+               logger (LOG_INFO, "checking %s is available on attached networks",
+                               inet_ntoa (address));
 
        if (! open_socket (iface, true))
                return (-1);
index 5323be320e0a8de62326714e5ebaf2dfd8520d4e..ed079b9841b3b944641d09f2453762f9d3a68f48 100644 (file)
--- a/client.c
+++ b/client.c
@@ -169,7 +169,8 @@ static bool get_old_lease (const options_t *options, interface_t *iface,
        struct timeval tv;
        unsigned int offset = 0;
 
-       logger (LOG_INFO, "trying to use old lease in `%s'", iface->infofile);
+       if (! IN_LINKLOCAL (ntohl (iface->previous_address.s_addr)))
+               logger (LOG_INFO, "trying to use old lease in `%s'", iface->infofile);
        if (! read_info (iface, dhcp))
                return (false);
 
@@ -587,7 +588,8 @@ int dhcp_run (const options_t *options, int *pidfd)
                                        timeout = options->timeout;
                                        iface->start_uptime = uptime ();
                                        if (dhcp->address.s_addr == 0) {
-                                               logger (LOG_INFO, "broadcasting for a lease");
+                                               if (! IN_LINKLOCAL (ntohl (iface->previous_address.s_addr)))
+                                                       logger (LOG_INFO, "broadcasting for a lease");
                                                SEND_MESSAGE (DHCP_DISCOVER);
                                        } else if (options->doinform) {
                                                logger (LOG_INFO, "broadcasting inform for %s",