diff options
author | brian <brian@FreeBSD.org> | 2001-07-18 09:33:45 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2001-07-18 09:33:45 +0000 |
commit | 0906f6dadabec90afba9d867c3a0920cbc922395 (patch) | |
tree | 703fd7ee92cb7f9f0d8180a4b87ab4e27147c3fc /usr.sbin/ppp/ether.c | |
parent | e59281e64fd8628f3f3833dee6f4ed76e9a533ad (diff) | |
download | FreeBSD-src-0906f6dadabec90afba9d867c3a0920cbc922395.zip FreeBSD-src-0906f6dadabec90afba9d867c3a0920cbc922395.tar.gz |
Bring the PPPoE Ethernet interface up *BEFORE* we send the node a
CONNECT message.
MFC after: 1 week
Diffstat (limited to 'usr.sbin/ppp/ether.c')
-rw-r--r-- | usr.sbin/ppp/ether.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/usr.sbin/ppp/ether.c b/usr.sbin/ppp/ether.c index 1e8d53c..7684a1f 100644 --- a/usr.sbin/ppp/ether.c +++ b/usr.sbin/ppp/ether.c @@ -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; } |