-/* $FreeBSD: src/sys/netinet6/ip6_mroute.c,v 1.2.2.4 2001/07/03 11:01:53 ume Exp $ */
-/* $KAME: ip6_mroute.c,v 1.46 2001/04/04 05:17:30 itojun Exp $ */
+/* $FreeBSD: src/sys/netinet6/ip6_mroute.c,v 1.16.2.1 2002/12/18 21:39:40 suz Exp $ */
+/* $KAME: ip6_mroute.c,v 1.58 2001/12/18 02:36:31 itojun Exp $ */
/*
* Copyright (C) 1998 WIDE Project.
#define RTE_FOUND 0x2
struct mf6c *mf6ctable[MF6CTBLSIZ];
-u_char nexpire[MF6CTBLSIZ];
+u_char n6expire[MF6CTBLSIZ];
static struct mif6 mif6table[MAXMIFS];
#if MRT6DEBUG
u_int mrt6debug = 0; /* debug level */
static mifi_t reg_mif_num = (mifi_t)-1;
static struct pim6stat pim6stat;
-
-/*
- * one-back cache used by ipip_input to locate a tunnel's mif
- * given a datagram's src ip address.
- */
static int pim6;
/*
ip6_mrouter_ver = cmd;
bzero((caddr_t)mf6ctable, sizeof(mf6ctable));
- bzero((caddr_t)nexpire, sizeof(nexpire));
+ bzero((caddr_t)n6expire, sizeof(n6expire));
pim6 = 0;/* used for stubbing out/in pim stuff */
if (rt) {
#if MRT6DEBUG
if (mrt6debug & DEBUG_MFC)
- log(LOG_DEBUG,"add_m6fc update o %s g %s p %x\n",
+ log(LOG_DEBUG,
+ "add_m6fc no upcall h %d o %s g %s p %x\n",
ip6_sprintf(&mfccp->mf6cc_origin.sin6_addr),
ip6_sprintf(&mfccp->mf6cc_mcastgrp.sin6_addr),
mfccp->mf6cc_parent);
rt->mf6c_wrong_if = 0;
rt->mf6c_expire = 0; /* Don't clean this guy up */
- nexpire[hash]--;
+ n6expire[hash]--;
/* free packets Qed at the end of this entry */
for (rte = rt->mf6c_stall; rte != NULL; ) {
rt->mf6c_wrong_if = 0;
if (rt->mf6c_expire)
- nexpire[hash]--;
+ n6expire[hash]--;
rt->mf6c_expire = 0;
}
}
rt->mf6c_mcastgrp.sin6_len = sizeof(struct sockaddr_in6);
rt->mf6c_mcastgrp.sin6_addr = ip6->ip6_dst;
rt->mf6c_expire = UPCALL_EXPIRE;
- nexpire[hash]++;
+ n6expire[hash]++;
rt->mf6c_parent = MF6C_INCOMPLETE_PARENT;
/* link into table */
s = splnet();
for (i = 0; i < MF6CTBLSIZ; i++) {
- if (nexpire[i] == 0)
+ if (n6expire[i] == 0)
continue;
nptr = &mf6ctable[i];
while ((mfc = *nptr) != NULL) {
rte = n;
} while (rte != NULL);
mrt6stat.mrt6s_cache_cleanups++;
- nexpire[i]--;
+ n6expire[i]--;
*nptr = mfc->mf6c_next;
FREE(mfc, M_MRTABLE);
/*
* Macro to send packet on mif. Since RSVP packets don't get counted on
* input, they shouldn't get counted on output, so statistics keeping is
- * seperate.
+ * separate.
*/
#define MC6_SEND(ip6, mifp, m) do { \
* Put the packet into the sending queue of the outgoing interface
* if it would fit in the MTU of the interface.
*/
- if (mb_copy->m_pkthdr.len < ifp->if_mtu || ifp->if_mtu < IPV6_MMTU) {
+ if (mb_copy->m_pkthdr.len <= ifp->if_mtu || ifp->if_mtu < IPV6_MMTU) {
dst6->sin6_len = sizeof(struct sockaddr_in6);
dst6->sin6_family = AF_INET6;
dst6->sin6_addr = ip6->ip6_dst;
#if MRT6DEBUG
if (mrt6debug)
log(LOG_WARNING,
- "register_send: ip_mrouter socket queue full\n");
+ "register_send: ip6_mrouter socket queue full\n");
#endif
++mrt6stat.mrt6s_upq_sockfull;
return ENOBUFS;