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

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

Diff for /src/sys/netinet6/ip6_input.c between version 1.7 and 1.8

version 1.7, 1999/08/07 12:33:04 version 1.8, 1999/10/01 10:15:16
Line 512  ip6_input(m)
Line 512  ip6_input(m)
                         ip6stat.ip6s_toomanyhdr++;                          ip6stat.ip6s_toomanyhdr++;
                         goto bad;                          goto bad;
                 }                  }
   
                   /*
                    * protection against faulty packet - there should be
                    * more sanity checks in header chain processing.
                    */
                   if (m->m_pkthdr.len < off) {
                           ip6stat.ip6s_tooshort++;
                           goto bad;
                   }
   
                 nxt = (*inet6sw[ip6_protox[nxt]].pr_input)(&m, &off, nxt);                  nxt = (*inet6sw[ip6_protox[nxt]].pr_input)(&m, &off, nxt);
         }          }
         return;          return;
Line 587  ip6_process_hopopts(m, opthead, hbhlen, 
Line 597  ip6_process_hopopts(m, opthead, hbhlen, 
                          optlen = *(opt + 1) + 2;                           optlen = *(opt + 1) + 2;
                          break;                           break;
                  case IP6OPT_RTALERT:                   case IP6OPT_RTALERT:
                            /* XXX may need check for alignment */
                          if (hbhlen < IP6OPT_RTALERT_LEN) {                           if (hbhlen < IP6OPT_RTALERT_LEN) {
                                  ip6stat.ip6s_toosmall++;                                   ip6stat.ip6s_toosmall++;
                                  goto bad;                                   goto bad;
Line 600  ip6_process_hopopts(m, opthead, hbhlen, 
Line 611  ip6_process_hopopts(m, opthead, hbhlen, 
                          *rtalertp = ntohs(rtalert_val);                           *rtalertp = ntohs(rtalert_val);
                          break;                           break;
                  case IP6OPT_JUMBO:                   case IP6OPT_JUMBO:
                            /* XXX may need check for alignment */
                          if (hbhlen < IP6OPT_JUMBO_LEN) {                           if (hbhlen < IP6OPT_JUMBO_LEN) {
                                  ip6stat.ip6s_toosmall++;                                   ip6stat.ip6s_toosmall++;
                                  goto bad;                                   goto bad;
Line 615  ip6_process_hopopts(m, opthead, hbhlen, 
Line 627  ip6_process_hopopts(m, opthead, hbhlen, 
                           * We can simply cast because of the alignment                            * We can simply cast because of the alignment
                           * requirement of the jumbo payload option.                            * requirement of the jumbo payload option.
                           */                            */
   #if 0
                          *plenp = ntohl(*(u_int32_t *)(opt + 2));                           *plenp = ntohl(*(u_int32_t *)(opt + 2));
   #else
                            bcopy(opt + 2, plenp, sizeof(*plenp));
                            *plenp = htonl(*plenp);
   #endif
                          if (*plenp <= IPV6_MAXPACKET) {                           if (*plenp <= IPV6_MAXPACKET) {
                                  /*                                   /*
                                   * jumbo payload length must be larger                                    * jumbo payload length must be larger

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

CVSweb <webmaster@jp.NetBSD.org>