diff options
author | brian <brian@FreeBSD.org> | 2001-05-11 23:42:03 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2001-05-11 23:42:03 +0000 |
commit | bba3cec519b0df520da69e77e569c12fad190810 (patch) | |
tree | 97b0cdd8e57c8a6c22343610c8e55f0e6fc45f65 /usr.sbin/ppp | |
parent | 9f9b0c09e47c0de82ee5052bace7f230cf1958ae (diff) | |
download | FreeBSD-src-bba3cec519b0df520da69e77e569c12fad190810.zip FreeBSD-src-bba3cec519b0df520da69e77e569c12fad190810.tar.gz |
Bring the interface IFF_UP from ipcp_InterfaceUp() (called from IPCP's
TLU event handler).
This used to be done as a side effect of SIOCAIFADDR'ing the interface,
but now that duplicate SIOCAIFADDRs are optimised out, we can't depend
on that behaviour.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/ipcp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c index 3e04e47..d9e4a04 100644 --- a/usr.sbin/ppp/ipcp.c +++ b/usr.sbin/ppp/ipcp.c @@ -29,6 +29,7 @@ #include <netinet/ip.h> #include <arpa/inet.h> #include <sys/socket.h> +#include <net/if.h> #include <net/route.h> #include <netdb.h> #include <sys/un.h> @@ -992,6 +993,12 @@ ipcp_InterfaceUp(struct ipcp *ipcp) return 0; } + if (!iface_SetFlags(ipcp->fsm.bundle->iface->name, IFF_UP)) { + log_Printf(LogERROR, "ipcp_InterfaceUp: Can't set the IFF_UP flag on %s\n", + ipcp->fsm.bundle->iface->name); + return 0; + } + #ifndef NONAT if (ipcp->fsm.bundle->NatEnabled) PacketAliasSetAddress(ipcp->my_ip); |