[BACK]Return to in6_gif.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/in6_gif.c between version 1.42 and 1.43

version 1.42, 2005/06/02 15:21:35 version 1.43, 2005/06/26 10:39:21
Line 46  __KERNEL_RCSID(0, "$NetBSD$");
Line 46  __KERNEL_RCSID(0, "$NetBSD$");
 #include <sys/queue.h>  #include <sys/queue.h>
 #include <sys/syslog.h>  #include <sys/syslog.h>
 #include <sys/protosw.h>  #include <sys/protosw.h>
   #include <sys/kernel.h>
   
 #include <net/if.h>  #include <net/if.h>
 #include <net/route.h>  #include <net/route.h>
Line 182  in6_gif_output(ifp, family, m)
Line 183  in6_gif_output(ifp, family, m)
         ip6->ip6_flow &= ~ntohl(0xff00000);          ip6->ip6_flow &= ~ntohl(0xff00000);
         ip6->ip6_flow |= htonl((u_int32_t)otos << 20);          ip6->ip6_flow |= htonl((u_int32_t)otos << 20);
   
         if (dst->sin6_family != sin6_dst->sin6_family ||          if (sc->gif_route_expire - time.tv_sec <= 0 ||
                dst->sin6_family != sin6_dst->sin6_family ||
              !IN6_ARE_ADDR_EQUAL(&dst->sin6_addr, &sin6_dst->sin6_addr)) {               !IN6_ARE_ADDR_EQUAL(&dst->sin6_addr, &sin6_dst->sin6_addr)) {
                 /* cache route doesn't match */                  /* cache route doesn't match */
                 bzero(dst, sizeof(*dst));                  bzero(dst, sizeof(*dst));
Line 207  in6_gif_output(ifp, family, m)
Line 209  in6_gif_output(ifp, family, m)
                         m_freem(m);                          m_freem(m);
                         return ENETUNREACH;     /* XXX */                          return ENETUNREACH;     /* XXX */
                 }                  }
   
                   sc->gif_route_expire = time.tv_sec + GIF_ROUTE_TTL;
         }          }
   
 #ifdef IPV6_MINMTU  #ifdef IPV6_MINMTU
Line 418  in6_gif_detach(sc)
Line 422  in6_gif_detach(sc)
         error = encap_detach(sc->encap_cookie6);          error = encap_detach(sc->encap_cookie6);
         if (error == 0)          if (error == 0)
                 sc->encap_cookie6 = NULL;                  sc->encap_cookie6 = NULL;
   
           if (sc->gif_ro6.ro_rt) {
                   RTFREE(sc->gif_ro6.ro_rt);
                   sc->gif_ro6.ro_rt = NULL;
           }
   
         return error;          return error;
 }  }
   

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

CVSweb <webmaster@jp.NetBSD.org>