msm: ipa: Add NAT and IPv6 CT suppression tests
Add kernel tests to validate NAT and IPv6 CT suppression tests. Change-Id: If69b651330846b92c85184c5afdeba73bafa1592 Signed-off-by: Chaitanya Pratapa <quic_cpratapa@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
47c0ae3849
commit
1fb4520d43
@@ -189,3 +189,25 @@ bool RoutingDriverWrapper::PutRoutingTable(uint32_t routingTableHandle)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RoutingDriverWrapper::SetNatConntrackExcRoutingTable(uint32_t routingTableHandle, bool nat_or_conntrack)
|
||||
{
|
||||
int retval = 0;
|
||||
|
||||
if (!DeviceNodeIsOpened())
|
||||
return false;
|
||||
|
||||
if (nat_or_conntrack)
|
||||
retval = ioctl(m_fd, IPA_IOC_SET_NAT_EXC_RT_TBL_IDX, routingTableHandle);
|
||||
else
|
||||
retval = ioctl(m_fd, IPA_IOC_SET_CONN_TRACK_EXC_RT_TBL_IDX, routingTableHandle);
|
||||
|
||||
if (retval) {
|
||||
printf("%s(), IPA_IOC_SET_CONN_TRACK_EXC_RT_TBL_IDX ioctl failed.\n", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
|
||||
printf("%s(), %s ioctl issued to IPA routing block.\n", __FUNCTION__,(nat_or_conntrack) ?
|
||||
"IPA_IOC_SET_NAT_EXC_RT_TBL_IDX" : "IPA_IOC_SET_CONN_TRACK_EXC_RT_TBL_IDX");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user