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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK4M3OjtNxB8xcmqQ1hVgbkV8i+=oOv9O8A1mMY2c_WM87a2qA@mail.gmail.com>
Date:	Fri, 31 Jul 2015 08:34:54 +0300
From:	Antti Paila <antti.paila@...il.com>
To:	netdev@...r.kernel.org
Subject: iproute2: ip batch processing problem

Hello,

I am facing an issue when configuring network interfaces with
"ip -force -batch" command. The problem occurs when the batch
file contains commands with both IPv4 and IPv6 addresses. If I run
the following commands in batch mode:

    tunnel add tunnel1 mode gre tos 1 local 192.168.0.1 remote
192.168.1.1 ttl 64 pmtudisc
    a a fd00::200:10:200:0:2/64 dev eth18

I get an error

    Command failed tunnel_batch2:1
    Error: an inet prefix is expected rather than "fd00::200:10:200:0:2/64".

I noticed that while processing the second line in the batch file,
'get_prefix()' is called with argument 'family == AF_INET'. I believe
the family should be in this case AF_INET6. The problem is that
the 'family' argument is fetched from the global variable 'preferred_family'
that was set to AF_INET while processing the first line of
the batch file.

Should the batch mode support mixed IPv4 and IPv6 addresses and if so,
would it make sense to clear the 'preferred_family' variable
before processing each line of the batch file?

-Antti
--
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