traffic mirror对不合法的intercept policy判空,避免段错误
This commit is contained in:
@@ -25,9 +25,16 @@ void policy_table_ex_data_dup_cb(int table_id, MAAT_PLUGIN_EX_DATA * to,
|
||||
MAAT_PLUGIN_EX_DATA * from, long argl, void * argp)
|
||||
{
|
||||
struct policy_table_ex_data * ex_data = (struct policy_table_ex_data *)*from;
|
||||
if(ex_data==NULL)
|
||||
{
|
||||
*to=NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
__sync_add_and_fetch(&ex_data->atomic_refcnt, 1);
|
||||
*to = (void *)ex_data;
|
||||
}
|
||||
}
|
||||
|
||||
void policy_table_ex_data_free_cb(int table_id, MAAT_PLUGIN_EX_DATA * ad, long argl, void * argp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user