Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet6 expand insque/remque (quick hack). fundamental...



details:   https://anonhg.NetBSD.org/src/rev/d800904e2702
branches:  trunk
changeset: 474260:d800904e2702
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Jul 02 12:43:42 1999 +0000

description:
expand insque/remque (quick hack).  fundamental fix should be done
while clarifying relationship between inpcb and in6pcb.

PR: 7891

diffstat:

 sys/netinet6/in6_pcb.c |  13 +++++++++++++
 sys/netinet6/nd6.c     |  13 +++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)

diffs (64 lines):

diff -r 036a1157a413 -r d800904e2702 sys/netinet6/in6_pcb.c
--- a/sys/netinet6/in6_pcb.c    Fri Jul 02 11:47:12 1999 +0000
+++ b/sys/netinet6/in6_pcb.c    Fri Jul 02 12:43:42 1999 +0000
@@ -115,7 +115,14 @@
        in6p->in6p_socket = so;
        in6p->in6p_hops = -1;   /* use kernel default */
        in6p->in6p_icmp6filt = NULL;
+#if 0
        insque(in6p, head);
+#else
+       in6p->in6p_next = head->in6p_next;
+       head->in6p_next = in6p;
+       in6p->in6p_prev = head;
+       in6p->in6p_next->in6p_prev = in6p;
+#endif
        so->so_pcb = (caddr_t)in6p;
        return(0);
 }
@@ -649,7 +656,13 @@
        if (in6p->in6p_route.ro_rt)
                rtfree(in6p->in6p_route.ro_rt);
        ip6_freemoptions(in6p->in6p_moptions);
+#if 0
        remque(in6p);
+#else
+       in6p->in6p_next->in6p_prev = in6p->in6p_prev;
+       in6p->in6p_prev->in6p_next = in6p->in6p_next;
+       in6p->in6p_prev = NULL;
+#endif
        FREE(in6p, M_PCB);
 }
 
diff -r 036a1157a413 -r d800904e2702 sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c        Fri Jul 02 11:47:12 1999 +0000
+++ b/sys/netinet6/nd6.c        Fri Jul 02 12:43:42 1999 +0000
@@ -893,7 +893,14 @@
                        ln->ln_expire = time_second;
                }
                rt->rt_flags |= RTF_LLINFO;
+#if 0
                insque(ln, &llinfo_nd6);
+#else
+               ln->ln_next = llinfo_nd6.ln_next;
+               llinfo_nd6.ln_next = ln;
+               ln->ln_prev = &llinfo_nd6;
+               ln->ln_next->ln_prev = ln;
+#endif
 
                /*
                 * check if rt_key(rt) is one of my address assigned
@@ -938,7 +945,13 @@
                if (!ln)
                        break;
                nd6_inuse--;
+#if 0
                remque(ln);
+#else
+               ln->ln_next->ln_prev = ln->ln_prev;
+               ln->ln_prev->ln_next = ln->ln_next;
+               ln->ln_prev = NULL;
+#endif
                rt->rt_llinfo = 0;
                rt->rt_flags &= ~RTF_LLINFO;
                if (ln->ln_hold)



Home | Main Index | Thread Index | Old Index