net: icmp: Don't unref net_pkt from the registered handler
A minor overlook from the recent ICMP rework, the registered handlers should no longer unref the processed packet as it's now the responsibility of the ICMP module. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
d7aaf0daf7
commit
51d3341066
8 changed files with 0 additions and 18 deletions
|
@ -491,8 +491,6 @@ static int icmpv4_handle_echo_request(struct net_icmp_ctx *ctx,
|
|||
|
||||
net_stats_update_icmp_sent(net_pkt_iface(reply));
|
||||
|
||||
net_pkt_unref(pkt);
|
||||
|
||||
return 0;
|
||||
drop:
|
||||
if (reply) {
|
||||
|
|
|
@ -168,8 +168,6 @@ static int icmpv6_handle_echo_request(struct net_icmp_ctx *ctx,
|
|||
|
||||
net_stats_update_icmp_sent(net_pkt_iface(reply));
|
||||
|
||||
net_pkt_unref(pkt);
|
||||
|
||||
return 0;
|
||||
|
||||
drop:
|
||||
|
|
|
@ -356,8 +356,6 @@ static int handle_mld_query(struct net_icmp_ctx *ctx,
|
|||
|
||||
send_mld_report(net_pkt_iface(pkt));
|
||||
|
||||
net_pkt_unref(pkt);
|
||||
|
||||
return 0;
|
||||
|
||||
drop:
|
||||
|
|
|
@ -1383,7 +1383,6 @@ send_na:
|
|||
|
||||
if (!net_ipv6_send_na(net_pkt_iface(pkt), na_src,
|
||||
na_dst, tgt, flags)) {
|
||||
net_pkt_unref(pkt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1822,8 +1821,6 @@ static int handle_na_input(struct net_icmp_ctx *ctx,
|
|||
goto drop;
|
||||
}
|
||||
|
||||
net_pkt_unref(pkt);
|
||||
|
||||
return 0;
|
||||
|
||||
drop:
|
||||
|
@ -2610,8 +2607,6 @@ static int handle_ra_input(struct net_icmp_ctx *ctx,
|
|||
/* Cancel the RS timer on iface */
|
||||
net_if_stop_rs(net_pkt_iface(pkt));
|
||||
|
||||
net_pkt_unref(pkt);
|
||||
|
||||
return 0;
|
||||
|
||||
drop:
|
||||
|
|
|
@ -4388,7 +4388,6 @@ static int handle_ipv6_echo_reply(struct net_icmp_ctx *ctx,
|
|||
ping_done(&ping_ctx);
|
||||
}
|
||||
|
||||
net_pkt_unref(pkt);
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
|
@ -4463,7 +4462,6 @@ static int handle_ipv4_echo_reply(struct net_icmp_ctx *ctx,
|
|||
ping_done(&ping_ctx);
|
||||
}
|
||||
|
||||
net_pkt_unref(pkt);
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -449,8 +449,6 @@ static int icmp_handler(struct net_icmp_ctx *ctx,
|
|||
test->req_received = true;
|
||||
k_sem_give(&test->tx_sem);
|
||||
|
||||
net_pkt_unref(pkt);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -131,7 +131,6 @@ static int handle_reply_msg(struct net_icmp_ctx *ctx,
|
|||
return -ENOMSG;
|
||||
}
|
||||
|
||||
net_pkt_unref(pkt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2282,8 +2282,6 @@ static int handle_ipv6_echo_reply(struct net_icmp_ctx *ctx,
|
|||
i++;
|
||||
}
|
||||
|
||||
net_pkt_unref(pkt);
|
||||
|
||||
k_sem_give(&wait_data);
|
||||
|
||||
return NET_OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue