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>] [day] [month] [year] [list]
Date:	Mon, 7 Mar 2016 21:39:01 -0500
From:	John Morrissey <jwm@...de.net>
To:	netdev@...r.kernel.org
Subject: 'ip tunnel add' uses the wrong interface name on error

'ip tunnel add' uses the wrong interface name in its error output.
For example, if the requested interface already exists:

--
[jwm@...st:pts/8 ~> sudo ip tunnel add sit1 mode sit remote 10.10.10.11 local 10.10.10.10
add tunnel "sit0" failed: No buffer space available
--

ip/tunnel.c:tnl_add_ioctl() only uses the passed interface name on
SIOCCHGTUNNEL, not SIOCADDTUNNEL. Shouldn't it always use the passed
interface name, if present?

--
int tnl_add_ioctl(int cmd, const char *basedev, const char *name, void *p)
{
    struct ifreq ifr;
    int fd;
    int err;

    if (cmd == SIOCCHGTUNNEL && name[0])
        strncpy(ifr.ifr_name, name, IFNAMSIZ);
    else
        strncpy(ifr.ifr_name, basedev, IFNAMSIZ);
[...]
    err = ioctl(fd, cmd, &ifr);
    if (err)
        fprintf(stderr, "add tunnel \"%s\" failed: %s\n", ifr.ifr_name,
            strerror(errno));
--

-john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ