Skip to content

Commit

Permalink
fou: avoid calling udp_del_offload() twice
Browse files Browse the repository at this point in the history
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: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
WANG Cong authored and David S. Miller committed Apr 13, 2015
1 parent d72da6a commit 9272f04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/fou.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ static void fou_release(struct fou *fou)
struct socket *sock = fou->sock;
struct sock *sk = sock->sk;

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

list_del(&fou->list);

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 9272f04

Please sign in to comment.