nas_config(): remove broadcast parameter
Remove the broadcast address from the UE, as logically, a UE has nothing to broadcast: it can only directly talk to the core. Additionally, at least as of now, the UE interface is shown as "POINTOPOINT", so broadcasting is not possible.
This commit is contained in:
@@ -136,11 +136,9 @@ int nas_config(int interface_id, int thirdOctet, int fourthOctet, const char *if
|
|||||||
{
|
{
|
||||||
//char buf[5];
|
//char buf[5];
|
||||||
char ipAddress[20];
|
char ipAddress[20];
|
||||||
char broadcastAddress[20];
|
|
||||||
char interfaceName[20];
|
char interfaceName[20];
|
||||||
int returnValue;
|
int returnValue;
|
||||||
sprintf(ipAddress, "%s.%d.%d", baseNetAddress,thirdOctet,fourthOctet);
|
sprintf(ipAddress, "%s.%d.%d", baseNetAddress,thirdOctet,fourthOctet);
|
||||||
sprintf(broadcastAddress, "%s.%d.255",baseNetAddress, thirdOctet);
|
|
||||||
sprintf(interfaceName, "%s%d", ifpref, interface_id);
|
sprintf(interfaceName, "%s%d", ifpref, interface_id);
|
||||||
bringInterfaceUp(interfaceName, 0);
|
bringInterfaceUp(interfaceName, 0);
|
||||||
// sets the machine address
|
// sets the machine address
|
||||||
@@ -150,19 +148,13 @@ int nas_config(int interface_id, int thirdOctet, int fourthOctet, const char *if
|
|||||||
if(!returnValue)
|
if(!returnValue)
|
||||||
returnValue= setInterfaceParameter(interfaceName, netMask,SIOCSIFNETMASK);
|
returnValue= setInterfaceParameter(interfaceName, netMask,SIOCSIFNETMASK);
|
||||||
|
|
||||||
// sets the machine broadcast address
|
|
||||||
if(!returnValue)
|
|
||||||
returnValue= setInterfaceParameter(interfaceName, broadcastAddress,SIOCSIFBRDADDR);
|
|
||||||
|
|
||||||
if(!returnValue)
|
if(!returnValue)
|
||||||
returnValue=bringInterfaceUp(interfaceName, 1);
|
returnValue=bringInterfaceUp(interfaceName, 1);
|
||||||
|
|
||||||
if(!returnValue)
|
if(!returnValue)
|
||||||
LOG_I(OIP,"Interface %s successfully configured, ip address %s, mask %s broadcast address %s\n",
|
LOG_I(OIP, "Interface %s successfully configured, ip address %s, mask %s\n", interfaceName, ipAddress, netMask);
|
||||||
interfaceName, ipAddress, netMask, broadcastAddress);
|
|
||||||
else
|
else
|
||||||
LOG_E(OIP,"Interface %s couldn't be configured (ip address %s, mask %s broadcast address %s)\n",
|
LOG_E(OIP, "Interface %s couldn't be configured (ip address %s, mask %s)\n", interfaceName, ipAddress, netMask);
|
||||||
interfaceName, ipAddress, netMask, broadcastAddress);
|
|
||||||
|
|
||||||
return returnValue;
|
return returnValue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user