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.
This commit is contained in:
Brian Somers 2001-05-11 23:42:03 +00:00
parent b012b205a7
commit 448374baae
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76492

View File

@ -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);