From: ebiederm@xmission.com (Eric W. Biederman)
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] vxlan: put UDP socket in correct namespace
Date: Mon, 01 Oct 2012 17:58:13 -0700 [thread overview]
Message-ID: <87626tbsgq.fsf@xmission.com> (raw)
In-Reply-To: <20121001175107.0ec2931c@nehalam.linuxnetplumber.net> (Stephen Hemminger's message of "Mon, 1 Oct 2012 17:51:07 -0700")
Stephen Hemminger <shemminger@vyatta.com> writes:
> Move vxlan UDP socket to correct network namespace
You also need to replease sock_release with
sk_release_kernel.
Otherwise you will decrement the network namespace count
below zero, when sock_release is called.
Eric
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> --- a/drivers/net/vxlan.c 2012-10-01 17:18:30.776513263 -0700
> +++ b/drivers/net/vxlan.c 2012-10-01 17:42:28.340411631 -0700
> @@ -1136,6 +1136,9 @@ static __net_init int vxlan_init_net(str
> pr_debug("UDP socket create failed\n");
> return rc;
> }
> + /* Put in proper namespace */
> + sk = vn->sock->sk;
> + sk_change_net(sk, net);
>
> vxlan_addr.sin_port = htons(vxlan_port);
>
> @@ -1150,7 +1153,6 @@ static __net_init int vxlan_init_net(str
> }
>
> /* Disable multicast loopback */
> - sk = vn->sock->sk;
> inet_sk(sk)->mc_loop = 0;
>
> /* Mark socket as an encapsulation socket. */
next prev parent reply other threads:[~2012-10-02 0:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20121001141609.14639bc0@nehalam.linuxnetplumber.net>
[not found] ` <20121001145838.5eafef4c@nehalam.linuxnetplumber.net>
2012-10-01 22:40 ` network namespace and kernel bind issue Eric W. Biederman
2012-10-01 22:57 ` Stephen Hemminger
2012-10-01 23:11 ` Eric W. Biederman
2012-10-01 23:32 ` Stephen Hemminger
2012-10-02 0:35 ` Eric W. Biederman
2012-10-02 0:48 ` Stephen Hemminger
2012-10-02 6:15 ` Julian Anastasov
2012-10-02 15:51 ` Stephen Hemminger
2012-10-02 0:51 ` [PATCH net-next] vxlan: put UDP socket in correct namespace Stephen Hemminger
2012-10-02 0:58 ` Eric W. Biederman [this message]
2012-10-02 4:49 ` [PATCHv2 " Stephen Hemminger
2012-10-02 15:18 ` Eric W. Biederman
2012-10-02 18:39 ` 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=87626tbsgq.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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.