global: Migrate CONFIG_SYS_FSL* symbols to the CFG_SYS namespace
[platform/kernel/u-boot.git] / net / ping.c
index 633c942..075df36 100644 (file)
@@ -11,6 +11,8 @@
 
 #include "ping.h"
 #include "arp.h"
+#include <log.h>
+#include <net.h>
 
 static ushort ping_seq_number;
 
@@ -88,6 +90,9 @@ void ping_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
                        net_set_state(NETLOOP_SUCCESS);
                return;
        case ICMP_ECHO_REQUEST:
+               if (net_ip.s_addr == 0)
+                       return;
+
                eth_hdr_size = net_update_ether(et, et->et_src, PROT_IP);
 
                debug_cond(DEBUG_DEV_PKT,