Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9272f048 authored by WANG Cong's avatar WANG Cong Committed by David S. Miller
Browse files

fou: avoid calling udp_del_offload() twice



This fixes the following harmless warning:

./ip/ip fou del port 7777
[  122.907516] udp_del_offload: didn't find offload for port 7777

Cc: Tom Herbert <tom@herbertland.com>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d72da6aa
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -410,6 +410,7 @@ static void fou_release(struct fou *fou)
	struct socket *sock = fou->sock;
	struct sock *sk = sock->sk;

	if (sk->sk_family == AF_INET)
		udp_del_offload(&fou->udp_offloads);

	list_del(&fou->list);
@@ -528,7 +529,6 @@ static int fou_destroy(struct net *net, struct fou_cfg *cfg)
	spin_lock(&fou_lock);
	list_for_each_entry(fou, &fou_list, list) {
		if (fou->port == port) {
			udp_del_offload(&fou->udp_offloads);
			fou_release(fou);
			err = 0;
			break;