fix(nr-ue): apply ip rules/route
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
@@ -344,6 +344,19 @@ int nas_config(int interface_id, int thirdOctet, int fourthOctet, char *ifname)
|
||||
LOG_E(OIP,"Interface %s couldn't be configured (ip address %s, mask %s broadcast address %s)\n",
|
||||
interfaceName, ipAddress, netMask, broadcastAddress);
|
||||
|
||||
int res;
|
||||
char command_line[500];
|
||||
res = sprintf(command_line,
|
||||
"ip rule add from %s/32 table %d && "
|
||||
"ip rule add to %s/32 table %d && "
|
||||
"ip route add default dev %s%d table %d",
|
||||
ipAddress, interface_id - 1 + 10000,
|
||||
ipAddress, interface_id - 1 + 10000,
|
||||
UE_NAS_USE_TUN ? "oaitun_ue" : "oip",
|
||||
interface_id, interface_id - 1 + 10000);
|
||||
|
||||
background_system(command_line);
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user