lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHA+R7PUF0Bh-fmJGiNx37-O7Nig2FxMON88pNcZPWPCJ7_CKA@mail.gmail.com>
Date:	Wed, 21 May 2014 22:56:38 -0700
From:	Cong Wang <cwang@...pensource.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Duan Jiong <duanj.fnst@...fujitsu.com>,
	David Miller <davem@...emloft.net>,
	Patrick McHardy <kaber@...sh.net>,
	Eric Dumazet <edumazet@...gle.com>,
	netdev <netdev@...r.kernel.org>,
	stephen hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH] net: modify tunnel's name when changing link's name

On Wed, May 21, 2014 at 9:12 PM, Cong Wang <cwang@...pensource.com> wrote:
> On Tue, May 20, 2014 at 5:19 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
>> On Tue, 2014-05-20 at 16:20 -0700, Cong Wang wrote:
>>> On Tue, May 20, 2014 at 12:21 PM, Cong Wang <cwang@...pensource.com> wrote:
>>> >
>>> > I am working on a patch.
>>>
>>> For now, I think we just fix the renaming issue.
>>> Please try this patch below (I already tested it actually).
>>>
>>> IPv6 part is on the way.
>>
>> This looks like bloat.
>>
>> Why do we need to copy dev->name into tunnel->param.name ?
>>
>> struct ip_tunnel_parm is legacy, but we do not need to store
>> anything in tunnel->param.name
>>
>> This can be filled when/if sent to userland.
>>
>>
>
> Yeah, that should work as well, it's a even quicker fix.
>
> I think we will need a notifier for tunnels anyway, for example, when
> the lower device (iflink) gets unregistered.

Or a even quicker fix:

diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index 289c6ee..e1dce3b 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -735,6 +735,8 @@ int ip_tunnel_ioctl(struct net_device *dev, struct
ip_tunnel_parm *p, int cmd)
                        if (t == NULL)
                                t = netdev_priv(dev);
                }
+               /* Device name might have been changed */
+               strlcpy(t->parms.name, t->dev->name, IFNAMSIZ);
                memcpy(p, &t->parms, sizeof(*p));
                break;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ