All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Cc: Tom Herbert <tom@herbertland.com>, Cong Wang <xiyou.wangcong@gmail.com>
Subject: [Patch net-next v2 1/5] fou: avoid calling udp_del_offload() twice
Date: Fri, 10 Apr 2015 12:00:26 -0700	[thread overview]
Message-ID: <1428692430-14465-2-git-send-email-xiyou.wangcong@gmail.com> (raw)
In-Reply-To: <1428692430-14465-1-git-send-email-xiyou.wangcong@gmail.com>

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>
---
 net/ipv4/fou.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c
index ff069f6..c8db627 100644
--- a/net/ipv4/fou.c
+++ b/net/ipv4/fou.c
@@ -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);
 
@@ -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;
-- 
1.8.3.1

  reply	other threads:[~2015-04-10 19:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 19:00 [Patch net-next v2 0/5] fou: some fixes and updates Cong Wang
2015-04-10 19:00 ` Cong Wang [this message]
2015-04-10 19:00 ` [Patch net-next v2 2/5] fou: exit early when parsing config fails Cong Wang
2015-04-10 19:00 ` [Patch net-next v2 3/5] fou: always use be16 for port Cong Wang
2015-04-10 19:00 ` [Patch net-next v2 4/5] fou: add network namespace support Cong Wang
2015-04-10 19:00 ` [Patch net-next v2 5/5] fou: implement FOU_CMD_GET Cong Wang
2015-04-10 20:38 ` [Patch net-next v2 0/5] fou: some fixes and updates Tom Herbert
2015-04-10 20:50   ` Cong Wang
2015-04-13  1:25     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1428692430-14465-2-git-send-email-xiyou.wangcong@gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.