nas_config(): change API to handle both IPv4 and IPv6
Implement handling of IPv4 and IPv6 (on the same interface) in nas_config().
This commit is contained in:
@@ -118,7 +118,7 @@ void capture_pdu_session_establishment_accept_msg(uint8_t *buffer, uint32_t msg_
|
||||
addr->pdu_addr_oct2,
|
||||
addr->pdu_addr_oct3,
|
||||
addr->pdu_addr_oct4);
|
||||
nas_config(1, ip, "oaitun_ue");
|
||||
nas_config(1, ip, NULL, "oaitun_ue");
|
||||
setup_ue_ipv4_route(1, ip, "oaitun_ue");
|
||||
LOG_T(NAS, "PDU SESSION ESTABLISHMENT ACCEPT - Received UE IP: %s\n", ip);
|
||||
} else {
|
||||
|
||||
@@ -845,7 +845,7 @@ void decodeDownlinkNASTransport(as_nas_info_t *initialNasMsg, uint8_t * pdu_buff
|
||||
char ip[20];
|
||||
sprintf(ip, "%d.%d.%d.%d", *(ip_p), *(ip_p + 1), *(ip_p + 2), *(ip_p + 3));
|
||||
LOG_A(NAS, "Received PDU Session Establishment Accept\n");
|
||||
nas_config(1, ip, "oaitun_ue");
|
||||
nas_config(1, ip, NULL, "oaitun_ue");
|
||||
setup_ue_ipv4_route(1, ip, "oaitun_ue");
|
||||
} else {
|
||||
LOG_E(NAS, "Received unexpected message in DLinformationTransfer %d\n", msg_type);
|
||||
@@ -1432,7 +1432,7 @@ void *nas_nrue(void *args_p)
|
||||
char ip[20];
|
||||
snprintf(ip, sizeof(ip), "%d.%d.%d.%d", *(ip_p), *(ip_p + 1), *(ip_p + 2), *(ip_p + 3));
|
||||
LOG_I(NAS, "Received PDU Session Establishment Accept, UE IP: %s\n", ip);
|
||||
nas_config(1, ip, "oaitun_ue");
|
||||
nas_config(1, ip, NULL, "oaitun_ue");
|
||||
setup_ue_ipv4_route(1, ip, "oaitun_ue");
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user