[BACK]Return to ip_input.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / netinet

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/netinet/ip_input.c between version and 1.4

version, 1993/11/14 17:54:46 version 1.4, 1993/12/06 04:59:37
Line 45 
Line 45 
 #include "time.h"  #include "time.h"
 #include "kernel.h"  #include "kernel.h"
 #include "machine/cpu.h"  
 #include "../net/if.h"  #include "../net/if.h"
 #include "../net/route.h"  #include "../net/route.h"
Line 144  ipintr()
Line 142  ipintr()
         register struct ipq *fp;          register struct ipq *fp;
         register struct in_ifaddr *ia;          register struct in_ifaddr *ia;
         int hlen, s;          int hlen, s;
         static int busy = 0;          static int busy = 0;
         if (busy)          if (busy)
Line 160  next:
Line 158  next:
         IF_DEQUEUE(&ipintrq, m);          IF_DEQUEUE(&ipintrq, m);
         splx(s);          splx(s);
         if (m == 0) {          if (m == 0) {
                 --busy;                  --busy;
 #endif  #endif
                 return;                  return;
Line 269  next:
Line 267  next:
                                 goto ours;                                  goto ours;
                 }                  }
         }          }
   #ifdef MULTICAST
           if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
                   struct in_multi *inm;
   #ifdef MROUTING
                   extern struct socket *ip_mrouter;
                   if (ip_mrouter) {
                            * If we are acting as a multicast router, all
                            * incoming multicast packets are passed to the
                            * kernel-level multicast forwarding function.
                            * The packet is returned (relatively) intact; if
                            * ip_mforward() returns a non-zero value, the packet
                            * must be discarded, else it may be accepted below.
                            * (The IP ident field is put in the same byte order
                            * as expected when ip_mforward() is called from
                            * ip_output().)
                           ip->ip_id = htons(ip->ip_id);
                           if (ip_mforward(ip, m->m_pkthdr.rcvif, m) != 0) {
                                   goto next;
                           ip->ip_id = ntohs(ip->ip_id);
                            * The process-level routing demon needs to receive
                            * all multicast IGMP packets, whether or not this
                            * host belongs to their destination groups.
                           if (ip->ip_p == IPPROTO_IGMP)
                                   goto ours;
                    * See if we belong to the destination multicast group on the
                    * arrival interface.
                   IN_LOOKUP_MULTI(ip->ip_dst, m->m_pkthdr.rcvif, inm);
                   if (inm == NULL) {
                           goto next;
                   goto ours;
         if (ip->ip_dst.s_addr == (u_long)INADDR_BROADCAST)          if (ip->ip_dst.s_addr == (u_long)INADDR_BROADCAST)
                 goto ours;                  goto ours;
         if (ip->ip_dst.s_addr == INADDR_ANY)          if (ip->ip_dst.s_addr == INADDR_ANY)

Removed from v.  
changed lines
  Added in v.1.4

CVSweb <webmaster@jp.NetBSD.org>