[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.82.2.4 and 1.82.2.5

version 1.82.2.4, 2000/02/12 18:10:24 version 1.82.2.5, 2000/03/02 10:24:18
Line 856  ip_dooptions(m)
Line 856  ip_dooptions(m)
         struct mbuf *m;          struct mbuf *m;
 {  {
         register struct ip *ip = mtod(m, struct ip *);          register struct ip *ip = mtod(m, struct ip *);
         register u_char *cp;          register u_char *cp, *cp0;
         register struct ip_timestamp *ipt;          register struct ip_timestamp *ipt;
         register struct in_ifaddr *ia;          register struct in_ifaddr *ia;
         int opt, optlen, cnt, off, code, type = ICMP_PARAMPROB, forward = 0;          int opt, optlen, cnt, off, code, type = ICMP_PARAMPROB, forward = 0;
         struct in_addr *sin, dst;          struct in_addr dst;
         n_time ntime;          n_time ntime;
   
         dst = ip->ip_dst;          dst = ip->ip_dst;
Line 990  ip_dooptions(m)
Line 990  ip_dooptions(m)
                                         goto bad;                                          goto bad;
                                 break;                                  break;
                         }                          }
                         sin = (struct in_addr *)(cp + ipt->ipt_ptr - 1);                          cp0 = (cp + ipt->ipt_ptr - 1);
                         switch (ipt->ipt_flg) {                          switch (ipt->ipt_flg) {
   
                         case IPOPT_TS_TSONLY:                          case IPOPT_TS_TSONLY:
Line 1005  ip_dooptions(m)
Line 1005  ip_dooptions(m)
                                                             m->m_pkthdr.rcvif);                                                              m->m_pkthdr.rcvif);
                                 if (ia == 0)                                  if (ia == 0)
                                         continue;                                          continue;
                                 bcopy((caddr_t)&ia->ia_addr.sin_addr,                                  bcopy(&ia->ia_addr.sin_addr,
                                     (caddr_t)sin, sizeof(struct in_addr));                                      cp0, sizeof(struct in_addr));
                                 ipt->ipt_ptr += sizeof(struct in_addr);                                  ipt->ipt_ptr += sizeof(struct in_addr);
                                 break;                                  break;
   
Line 1014  ip_dooptions(m)
Line 1014  ip_dooptions(m)
                                 if (ipt->ipt_ptr - 1 + sizeof(n_time) +                                  if (ipt->ipt_ptr - 1 + sizeof(n_time) +
                                     sizeof(struct in_addr) > ipt->ipt_len)                                      sizeof(struct in_addr) > ipt->ipt_len)
                                         goto bad;                                          goto bad;
                                 bcopy((caddr_t)sin, (caddr_t)&ipaddr.sin_addr,                                  bcopy(cp0, &ipaddr.sin_addr,
                                     sizeof(struct in_addr));                                      sizeof(struct in_addr));
                                 if (ifa_ifwithaddr((SA)&ipaddr) == 0)                                  if (ifa_ifwithaddr((SA)&ipaddr) == 0)
                                         continue;                                          continue;
Line 1025  ip_dooptions(m)
Line 1025  ip_dooptions(m)
                                 goto bad;                                  goto bad;
                         }                          }
                         ntime = iptime();                          ntime = iptime();
                         bcopy((caddr_t)&ntime, (caddr_t)cp + ipt->ipt_ptr - 1,                          cp0 = (u_char *) &ntime;        /* XXX GCC BUG */
                           bcopy(cp0, (caddr_t)cp + ipt->ipt_ptr - 1,
                             sizeof(n_time));                              sizeof(n_time));
                         ipt->ipt_ptr += sizeof(n_time);                          ipt->ipt_ptr += sizeof(n_time);
                 }                  }

Legend:
Removed from v.1.82.2.4  
changed lines
  Added in v.1.82.2.5

CVSweb <webmaster@jp.NetBSD.org>