Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/netinet Pullup rev. 1.54 and 1.55 (approved by jhawk):



details:   https://anonhg.NetBSD.org/src/rev/1ebf075f7dfb
branches:  netbsd-1-5
changeset: 489720:1ebf075f7dfb
user:      enami <enami%NetBSD.org@localhost>
date:      Mon Oct 09 02:25:26 2000 +0000

description:
Pullup rev. 1.54 and 1.55 (approved by jhawk):
----------------------------
  revision 1.55
  date: 2000/10/06 10:21:06;  author: enami;  state: Exp;  lines: +3 -3
  Cosmetic changes to previous commit; indent break statement sanely.
  ----------------------------
  revision 1.54
  date: 2000/10/06 09:24:40;  author: enami;  state: Exp;  lines: +13 -5
  Just call matching purgeif/pcbpurgeif routine for the protocol family.
  Without this, if a v6 address is placed before a v4 address in if_addrlist,
  a PRU_PURGEIF request for v6 tcp protocol purges also v4 addresses and,
  as a result, if_detach fails to request PRU_PURGEIF for v4 protocols
  other than tcp.

diffstat:

 sys/netinet/tcp_usrreq.c |  18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r 519652604bf6 -r 1ebf075f7dfb sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c  Sun Oct 08 23:49:51 2000 +0000
+++ b/sys/netinet/tcp_usrreq.c  Mon Oct 09 02:25:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_usrreq.c,v 1.51.2.1 2000/08/16 01:22:24 itojun Exp $       */
+/*     $NetBSD: tcp_usrreq.c,v 1.51.2.2 2000/10/09 02:25:26 enami Exp $        */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -201,12 +201,20 @@
        }
 
        if (req == PRU_PURGEIF) {
-               in_purgeif((struct ifnet *)control);
-               in_pcbpurgeif(&tcbtable, (struct ifnet *)control);
+               switch (family) {
+               case PF_INET:
+                       in_purgeif((struct ifnet *)control);
+                       in_pcbpurgeif(&tcbtable, (struct ifnet *)control);
+                       break;
 #ifdef INET6
-               in6_purgeif((struct ifnet *)control);
-               in6_pcbpurgeif(&tcb6, (struct ifnet *)control);
+               case PF_INET6:
+                       in6_purgeif((struct ifnet *)control);
+                       in6_pcbpurgeif(&tcb6, (struct ifnet *)control);
+                       break;
 #endif
+               default:
+                       return (EAFNOSUPPORT);
+               }
                return (0);
        }
 



Home | Main Index | Thread Index | Old Index