MOD aaa-12 代码优化
SOL 修改人:gechangwei 检视人:gechangwei Signed-off-by: gechangwei <gechangwei@cmhi.chinamobile.com>
This commit is contained in:
parent
c0c1ac9c92
commit
e52e2bc5b4
|
@ -153,9 +153,9 @@ int debugfs_prk_onoff(struct netlinkk_cfg *g_nlcfg, struct nlmsghdr *nlh,struct
|
|||
unsigned char * cookies = "test cookies";
|
||||
int err, len = 0;
|
||||
|
||||
char *pload;
|
||||
struct nlattr *rta;
|
||||
char* load;
|
||||
char *pload = NULL;
|
||||
struct nlattr *rta = NULL;
|
||||
char* load = NULL;
|
||||
unsigned long fk_type;
|
||||
|
||||
pload = nlmsg_data(nlh);
|
||||
|
@ -218,12 +218,12 @@ int debugfs_pkt_num_stati_witisend(struct netlinkk_cfg *g_nlcfg,
|
|||
struct nlmsghdr *nlh,struct commnl_msgtype_process* msg_process)
|
||||
{
|
||||
int err;
|
||||
struct sk_buff *out_skb;
|
||||
struct nlmsghdr *out_nlh;
|
||||
struct sk_buff *out_skb = NULL;
|
||||
struct nlmsghdr *out_nlh = NULL;
|
||||
unsigned int length = sizeof(struct netlink_debugfs);
|
||||
char *pload;
|
||||
struct nlattr *rta;
|
||||
char* load;
|
||||
char *pload = NULL;
|
||||
struct nlattr *rta = NULL;
|
||||
char* load = NULL;
|
||||
unsigned long fk_type;
|
||||
struct netlink_debugfs * tmp_dfs = NULL;
|
||||
|
||||
|
|
|
@ -204,10 +204,10 @@ unsigned int pdelivery_hook_func(void *priv,
|
|||
struct sk_buff *skb,
|
||||
const struct nf_hook_state *state)
|
||||
{
|
||||
void *payload;
|
||||
struct sk_buff *out_skb;
|
||||
void *out_payload;
|
||||
struct nlmsghdr *out_nlh;
|
||||
void *payload = NULL;
|
||||
struct sk_buff *out_skb = NULL;
|
||||
void *out_payload = NULL;
|
||||
struct nlmsghdr *out_nlh = NULL;
|
||||
int payload_len; // with padding, but ok for echo
|
||||
//struct iphdr *iph;
|
||||
int ret = -1;
|
||||
|
@ -224,7 +224,7 @@ unsigned int pdelivery_hook_func(void *priv,
|
|||
payload_len = skb->len + skb->mac_len;/**/
|
||||
|
||||
|
||||
out_skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); //分配足以存放默认大小的sk_buff
|
||||
out_skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC); //分配足以存放默认大小的sk_buff
|
||||
if (!out_skb)
|
||||
{
|
||||
goto failure;
|
||||
|
|
Loading…
Reference in New Issue