version 1.32, 2002/11/11 18:35:28 |
version 1.32.6.2, 2004/09/18 14:54:53 |
Line 79 int ip_gif_ttl = GIF_TTL; |
|
Line 79 int ip_gif_ttl = GIF_TTL; |
|
int ip_gif_ttl = 0; |
int ip_gif_ttl = 0; |
#endif |
#endif |
|
|
extern struct domain inetdomain; |
const struct protosw in_gif_protosw = |
struct protosw in_gif_protosw = |
|
{ SOCK_RAW, &inetdomain, 0/* IPPROTO_IPV[46] */, PR_ATOMIC|PR_ADDR, |
{ SOCK_RAW, &inetdomain, 0/* IPPROTO_IPV[46] */, PR_ATOMIC|PR_ADDR, |
in_gif_input, rip_output, 0, rip_ctloutput, |
in_gif_input, rip_output, 0, rip_ctloutput, |
rip_usrreq, |
rip_usrreq, |
Line 208 in_gif_output(ifp, family, m) |
|
Line 207 in_gif_output(ifp, family, m) |
|
} |
} |
} |
} |
|
|
error = ip_output(m, NULL, &sc->gif_ro, 0, NULL); |
error = ip_output(m, NULL, &sc->gif_ro, 0, NULL, NULL); |
return (error); |
return (error); |
} |
} |
|
|
void |
void |
#if __STDC__ |
|
in_gif_input(struct mbuf *m, ...) |
in_gif_input(struct mbuf *m, ...) |
#else |
|
in_gif_input(m, va_alist) |
|
struct mbuf *m; |
|
va_dcl |
|
#endif |
|
{ |
{ |
int off, proto; |
int off, proto; |
struct ifnet *gifp = NULL; |
struct ifnet *gifp = NULL; |
Line 336 gif_validate4(ip, sc, ifp) |
|
Line 329 gif_validate4(ip, sc, ifp) |
|
return 0; |
return 0; |
} |
} |
/* reject packets with broadcast on source */ |
/* reject packets with broadcast on source */ |
TAILQ_FOREACH(ia4, &in_ifaddr, ia_list) { |
TAILQ_FOREACH(ia4, &in_ifaddrhead, ia_list) { |
if ((ia4->ia_ifa.ifa_ifp->if_flags & IFF_BROADCAST) == 0) |
if ((ia4->ia_ifa.ifa_ifp->if_flags & IFF_BROADCAST) == 0) |
continue; |
continue; |
if (ip->ip_src.s_addr == ia4->ia_broadaddr.sin_addr.s_addr) |
if (ip->ip_src.s_addr == ia4->ia_broadaddr.sin_addr.s_addr) |