Source-Changes-HG archive

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

[src/trunk]: src/sys/net When setting an address on an interface, for address...



details:   https://anonhg.NetBSD.org/src/rev/e331786f3d07
branches:  trunk
changeset: 511902:e331786f3d07
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jun 29 18:12:09 2001 +0000

description:
When setting an address on an interface, for address families which
do not require changing the link-level address, only (*if_init)()
if the interface is not already RUNNING.

diffstat:

 sys/net/if_ethersubr.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 776c794fec6c -r e331786f3d07 sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c    Fri Jun 29 17:22:50 2001 +0000
+++ b/sys/net/if_ethersubr.c    Fri Jun 29 18:12:09 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ethersubr.c,v 1.85 2001/06/14 05:44:24 itojun Exp $ */
+/*     $NetBSD: if_ethersubr.c,v 1.86 2001/06/29 18:12:09 thorpej Exp $        */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -1363,7 +1363,8 @@
                    }
 #ifdef INET
                case AF_INET:
-                       if ((error = (*ifp->if_init)(ifp)) != 0)
+                       if ((ifp->if_flags & IFF_RUNNING) == 0 &&
+                           (error = (*ifp->if_init)(ifp)) != 0)
                                break;
                        arp_ifinit(ifp, ifa);
                        break;
@@ -1385,7 +1386,8 @@
                    }
 #endif /* NS */
                default:
-                       error = (*ifp->if_init)(ifp);
+                       if ((ifp->if_flags & IFF_RUNNING) == 0)
+                               error = (*ifp->if_init)(ifp);
                        break;
                }
                break;



Home | Main Index | Thread Index | Old Index