summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>2001-08-02 20:52:57 +0000
committerbrian <brian@cvs.openbsd.org>2001-08-02 20:52:57 +0000
commit6cc68036ce36d1f5c0558a8c86caa3890ea5f0c0 (patch)
treeccaa34beefc467a38365d098a7edd5fc432c422e /usr.sbin
parent64a1c79a7541a096ea863dc9e5a8787acdacba80 (diff)
Sync with FreeBSD (doesn't apply to obsd)
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/ppp/ether.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/usr.sbin/ppp/ppp/ether.c b/usr.sbin/ppp/ppp/ether.c
index cbc07f39df2..82b9f74f3ff 100644
--- a/usr.sbin/ppp/ppp/ether.c
+++ b/usr.sbin/ppp/ppp/ether.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: ether.c,v 1.11 2001/06/19 10:24:52 brian Exp $
+ * $OpenBSD: ether.c,v 1.12 2001/08/02 20:52:56 brian Exp $
*/
#include <sys/param.h>
@@ -595,6 +595,12 @@ ether_Create(struct physical *p)
return ether_Abandon(dev, p);
}
+ /* Bring the Ethernet interface up */
+ path[ifacelen] = '\0'; /* Remove the trailing ':' */
+ if (!iface_SetFlags(path, IFF_UP))
+ log_Printf(LogWARN, "%s: Failed to set the IFF_UP flag on %s\n",
+ p->link.name, path);
+
/* And finally, request a connection to the given provider */
data = (struct ngpppoe_init_data *)alloca(sizeof *data + providerlen);
@@ -675,16 +681,6 @@ ether_Create(struct physical *p)
if (dev) {
physical_SetupStack(p, dev->dev.name, PHYSICAL_FORCE_SYNCNOACF);
-
- if (path != NULL) {
- /* Mark the interface as UP if it's not already */
-
- path[ifacelen] = '\0'; /* Remove the trailing ':' */
- if (!iface_SetFlags(path, IFF_UP))
- log_Printf(LogWARN, "%s: Failed to set the IFF_UP flag on %s\n",
- p->link.name, path);
- }
-
return &dev->dev;
}