aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/dhcpd.c')
-rw-r--r--networking/udhcp/dhcpd.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index 0c55fa5e4..d248d2b67 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -104,7 +104,7 @@ static void log_static_leases(struct static_lease **st_lease_pp)
104 104
105 cur = *st_lease_pp; 105 cur = *st_lease_pp;
106 while (cur) { 106 while (cur) {
107 bb_error_msg("static lease: mac:%02x:%02x:%02x:%02x:%02x:%02x nip:%x", 107 bb_info_msg("static lease: mac:%02x:%02x:%02x:%02x:%02x:%02x nip:%x",
108 cur->mac[0], cur->mac[1], cur->mac[2], 108 cur->mac[0], cur->mac[1], cur->mac[2],
109 cur->mac[3], cur->mac[4], cur->mac[5], 109 cur->mac[3], cur->mac[4], cur->mac[5],
110 cur->nip 110 cur->nip
@@ -242,7 +242,7 @@ static int nobody_responds_to_arp(uint32_t nip, const uint8_t *safe_mac, unsigne
242 return r; 242 return r;
243 243
244 temp.s_addr = nip; 244 temp.s_addr = nip;
245 bb_error_msg("%s belongs to someone, reserving it for %u seconds", 245 bb_info_msg("%s belongs to someone, reserving it for %u seconds",
246 inet_ntoa(temp), (unsigned)server_config.conflict_time); 246 inet_ntoa(temp), (unsigned)server_config.conflict_time);
247 add_lease(NULL, nip, server_config.conflict_time, NULL, 0); 247 add_lease(NULL, nip, server_config.conflict_time, NULL, 0);
248 return 0; 248 return 0;
@@ -722,7 +722,7 @@ static NOINLINE void send_offer(struct dhcp_packet *oldpacket,
722 add_server_options(&packet); 722 add_server_options(&packet);
723 723
724 addr.s_addr = packet.yiaddr; 724 addr.s_addr = packet.yiaddr;
725 bb_error_msg("sending OFFER of %s", inet_ntoa(addr)); 725 bb_info_msg("sending OFFER of %s", inet_ntoa(addr));
726 /* send_packet emits error message itself if it detects failure */ 726 /* send_packet emits error message itself if it detects failure */
727 send_packet(&packet, /*force_bcast:*/ 0); 727 send_packet(&packet, /*force_bcast:*/ 0);
728} 728}
@@ -755,7 +755,7 @@ static NOINLINE void send_ACK(struct dhcp_packet *oldpacket, uint32_t yiaddr)
755 add_server_options(&packet); 755 add_server_options(&packet);
756 756
757 addr.s_addr = yiaddr; 757 addr.s_addr = yiaddr;
758 bb_error_msg("sending ACK to %s", inet_ntoa(addr)); 758 bb_info_msg("sending ACK to %s", inet_ntoa(addr));
759 send_packet(&packet, /*force_bcast:*/ 0); 759 send_packet(&packet, /*force_bcast:*/ 0);
760 760
761 p_host_name = (const char*) udhcp_get_option(oldpacket, DHCP_HOST_NAME); 761 p_host_name = (const char*) udhcp_get_option(oldpacket, DHCP_HOST_NAME);
@@ -865,7 +865,7 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv)
865 write_pidfile(server_config.pidfile); 865 write_pidfile(server_config.pidfile);
866 /* if (!..) bb_perror_msg("can't create pidfile %s", pidfile); */ 866 /* if (!..) bb_perror_msg("can't create pidfile %s", pidfile); */
867 867
868 bb_error_msg("started, v"BB_VER); 868 bb_info_msg("started, v"BB_VER);
869 869
870 option = udhcp_find_option(server_config.options, DHCP_LEASE_TIME); 870 option = udhcp_find_option(server_config.options, DHCP_LEASE_TIME);
871 server_config.max_lease_sec = DEFAULT_LEASE_TIME; 871 server_config.max_lease_sec = DEFAULT_LEASE_TIME;
@@ -944,12 +944,12 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv)
944 944
945 if (pfds[0].revents) switch (udhcp_sp_read()) { 945 if (pfds[0].revents) switch (udhcp_sp_read()) {
946 case SIGUSR1: 946 case SIGUSR1:
947 bb_error_msg("received %s", "SIGUSR1"); 947 bb_info_msg("received %s", "SIGUSR1");
948 write_leases(); 948 write_leases();
949 /* why not just reset the timeout, eh */ 949 /* why not just reset the timeout, eh */
950 goto continue_with_autotime; 950 goto continue_with_autotime;
951 case SIGTERM: 951 case SIGTERM:
952 bb_error_msg("received %s", "SIGTERM"); 952 bb_info_msg("received %s", "SIGTERM");
953 write_leases(); 953 write_leases();
954 goto ret0; 954 goto ret0;
955 } 955 }
@@ -973,16 +973,16 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv)
973 continue; 973 continue;
974 } 974 }
975 if (packet.hlen != 6) { 975 if (packet.hlen != 6) {
976 bb_error_msg("MAC length != 6, ignoring packet"); 976 bb_info_msg("MAC length != 6, ignoring packet");
977 continue; 977 continue;
978 } 978 }
979 if (packet.op != BOOTREQUEST) { 979 if (packet.op != BOOTREQUEST) {
980 bb_error_msg("not a REQUEST, ignoring packet"); 980 bb_info_msg("not a REQUEST, ignoring packet");
981 continue; 981 continue;
982 } 982 }
983 state = udhcp_get_option(&packet, DHCP_MESSAGE_TYPE); 983 state = udhcp_get_option(&packet, DHCP_MESSAGE_TYPE);
984 if (state == NULL || state[0] < DHCP_MINTYPE || state[0] > DHCP_MAXTYPE) { 984 if (state == NULL || state[0] < DHCP_MINTYPE || state[0] > DHCP_MAXTYPE) {
985 bb_error_msg("no or bad message type option, ignoring packet"); 985 bb_info_msg("no or bad message type option, ignoring packet");
986 continue; 986 continue;
987 } 987 }
988 988
@@ -1001,7 +1001,7 @@ int udhcpd_main(int argc UNUSED_PARAM, char **argv)
1001 /* Look for a static/dynamic lease */ 1001 /* Look for a static/dynamic lease */
1002 static_lease_nip = get_static_nip_by_mac(server_config.static_leases, &packet.chaddr); 1002 static_lease_nip = get_static_nip_by_mac(server_config.static_leases, &packet.chaddr);
1003 if (static_lease_nip) { 1003 if (static_lease_nip) {
1004 bb_error_msg("found static lease: %x", static_lease_nip); 1004 bb_info_msg("found static lease: %x", static_lease_nip);
1005 memcpy(&fake_lease.lease_mac, &packet.chaddr, 6); 1005 memcpy(&fake_lease.lease_mac, &packet.chaddr, 6);
1006 fake_lease.lease_nip = static_lease_nip; 1006 fake_lease.lease_nip = static_lease_nip;
1007 fake_lease.expires = 0; 1007 fake_lease.expires = 0;