[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 1.245.2.5 and 1.250.4.2

version 1.245.2.5, 2007/10/09 13:44:50 version 1.250.4.2, 2007/09/03 16:49:04
Line 1013  found:
Line 1013  found:
                         /* XXX error stat??? */                          /* XXX error stat??? */
                         error = EINVAL;                          error = EINVAL;
 DPRINTF(("ip_input: no SP, packet discarded\n"));/*XXX*/  DPRINTF(("ip_input: no SP, packet discarded\n"));/*XXX*/
                           goto bad;
                 }                  }
                 splx(s);                  splx(s);
                 if (error)                  if (error)
Line 1776  ip_srcroute(void)
Line 1777  ip_srcroute(void)
         return (m);          return (m);
 }  }
   
   /*
    * Strip out IP options, at higher
    * level protocol in the kernel.
    * Second argument is buffer to which options
    * will be moved, and return value is their length.
    * XXX should be deleted; last arg currently ignored.
    */
   void
   ip_stripoptions(struct mbuf *m, struct mbuf *mopt)
   {
           int i;
           struct ip *ip = mtod(m, struct ip *);
           void *opts;
           int olen;
   
           olen = (ip->ip_hl << 2) - sizeof (struct ip);
           opts = (void *)(ip + 1);
           i = m->m_len - (sizeof (struct ip) + olen);
           memmove(opts, (char *)opts + olen, (unsigned)i);
           m->m_len -= olen;
           if (m->m_flags & M_PKTHDR)
                   m->m_pkthdr.len -= olen;
           ip->ip_len = htons(ntohs(ip->ip_len) - olen);
           ip->ip_hl = sizeof (struct ip) >> 2;
   }
   
 const int inetctlerrmap[PRC_NCMDS] = {  const int inetctlerrmap[PRC_NCMDS] = {
         0,              0,              0,              0,          0,              0,              0,              0,
         0,              EMSGSIZE,       EHOSTDOWN,      EHOSTUNREACH,          0,              EMSGSIZE,       EHOSTDOWN,      EHOSTUNREACH,

Legend:
Removed from v.1.245.2.5  
changed lines
  Added in v.1.250.4.2

CVSweb <webmaster@jp.NetBSD.org>