Skip to content

Commit

Permalink
try fix inet_sock_destruct warn
Browse files Browse the repository at this point in the history
  • Loading branch information
QiuSimons committed Jan 22, 2025
1 parent 3d1e367 commit 7112069
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -616,7 +616,7 @@ static int dccp_v6_do_rcv(struct sock *s
by tcp. Feel free to propose better solution.
--ANK (980728)
*/
- if (np->rxopt.all)
+ if (np->rxopt.all && sk->sk_state != DCCP_LISTEN)
opt_skb = skb_clone_and_charge_r(skb, sk);

if (sk->sk_state == DCCP_OPEN) { /* Fast path */
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1458,7 +1458,7 @@ int tcp_v6_do_rcv(struct sock *sk, struc
by tcp. Feel free to propose better solution.
--ANK (980728)
*/
- if (np->rxopt.all)
+ if (np->rxopt.all && sk->sk_state != TCP_LISTEN)
opt_skb = skb_clone_and_charge_r(skb, sk);

reason = SKB_DROP_REASON_NOT_SPECIFIED;
@@ -1497,8 +1497,6 @@ int tcp_v6_do_rcv(struct sock *sk, struc
if (nsk != sk) {
if (tcp_child_process(sk, nsk, skb))
goto reset;
- if (opt_skb)
- __kfree_skb(opt_skb);
return 0;
}
} else
2 changes: 2 additions & 0 deletions SCRIPTS/02_prepare_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ CONFIG_LRNG_SELFTEST=y
cp -rf ../PATCH/kernel/wg/* ./target/linux/generic/hack-6.6/
# dont wrongly interpret first-time data
echo "net.netfilter.nf_conntrack_tcp_max_retrans=5" >>./package/kernel/linux/files/sysctl-nf-conntrack.conf
# OTHERS
cp -rf ../PATCH/kernel/others/* ./target/linux/generic/pending-6.6/

### Fullcone-NAT 部分 ###
# bcmfullcone
Expand Down

0 comments on commit 7112069

Please sign in to comment.