From 5472d94b73d104af5e3865ee6e24927184b8b212 Mon Sep 17 00:00:00 2001 From: likewise Date: Wed, 11 Dec 2002 00:21:12 +0000 Subject: [PATCH] Added comment to ip_input() packet filter. --- src/core/ipv4/ip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/ipv4/ip.c b/src/core/ipv4/ip.c index d230f5ec..30c85026 100644 --- a/src/core/ipv4/ip.c +++ b/src/core/ipv4/ip.c @@ -312,10 +312,14 @@ ip_input(struct pbuf *p, struct netif *inp) { netif->ip_addr.addr & netif->netmask.addr, iphdr->dest.addr & ~(netif->netmask.addr))); + /* interface unconfigured? */ if(ip_addr_isany(&(netif->ip_addr)) || + /* or unicast to this interface address? */ ip_addr_cmp(&(iphdr->dest), &(netif->ip_addr)) || + /* or broadcast on this interface network address ? */ (ip_addr_isbroadcast(&(iphdr->dest), &(netif->netmask)) && ip_addr_maskcmp(&(iphdr->dest), &(netif->ip_addr), &(netif->netmask))) || + /* or restricted broadcast? */ ip_addr_cmp(&(iphdr->dest), IP_ADDR_BROADCAST)) { break; }