625df645b703dc858d54784c35beff64464afae2 |
|
02-Oct-2017 |
Phil Sutter <phil@nwl.cc> |
Check user supplied interface name lengths The original problem was that something like: | strncpy(ifr.ifr_name, *argv, IFNAMSIZ); might leave ifr.ifr_name unterminated if length of *argv exceeds IFNAMSIZ. In order to fix this, I thought about replacing all those cases with (equivalent) calls to snprintf() or even introducing strlcpy(). But as Ulrich Drepper correctly pointed out when rejecting the latter from being added to glibc, truncating a string without notifying the user is not to be considered good practice. So let's excercise what he suggested and reject empty, overlong or otherwise invalid interface names right from the start - this way calls to strncpy() like shown above become safe and the user has a chance to reconsider what he was trying to do. Note that this doesn't add calls to check_ifname() to all places where user supplied interface name is parsed. In many cases, the interface must exist already and is therefore looked up using ll_name_to_index(), so if_nametoindex() will perform the necessary checks already. Signed-off-by: Phil Sutter <phil@nwl.cc>
/external/iproute2/ip/iptuntap.c
|
113fab78e48c14c0d2a57ae8ada95a5921f70538 |
|
08-Sep-2016 |
Thomas Graf <tgraf@suug.ch> |
tuntap: Add name attribute to usage text Signed-off-by: Thomas Graf <tgraf@suug.ch>
/external/iproute2/ip/iptuntap.c
|
cc28aad1e6d4f1a5b9e2ba79342bd7fb769a8df3 |
|
01-Sep-2016 |
Stephen Hemminger <stephen@networkplumber.org> |
ip: iptuntap cleanup Minor whitespace changes
/external/iproute2/ip/iptuntap.c
|
ae810982ccd012e8566aca18b73842019806f872 |
|
01-Sep-2016 |
Stephen Hemminger <stephen@networkplumber.org> |
remove useless return statement Get rid of: void foo() { ... return; }
/external/iproute2/ip/iptuntap.c
|
567e6960721b7e3b78cae7a46f8cd057b505ad9a |
|
24-Aug-2016 |
Hannes Frederic Sowa <hannes@stressinduktion.org> |
iptuntap: show processes using tuntap interface Show which processes are using which tun/tap devices, e.g.: $ ip -d tuntap tun0: tun Attached to processes: vpnc(9531) vnet0: tap vnet_hdr Attached to processes: qemu-system-x86(10442) virbr0-nic: tap UNKNOWN_FLAGS:800 Attached to processes: Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
/external/iproute2/ip/iptuntap.c
|
56f5daac98da0c405fdbc52f04afd5de82404bce |
|
21-Mar-2016 |
Stephen Hemminger <stephen@networkplumber.org> |
ip: code cleanup Run all the ip code through checkpatch and have it fix the obvious stuff.
/external/iproute2/ip/iptuntap.c
|
08ce8ae95d6ecc9890e670ab3a669af886206257 |
|
16-Sep-2014 |
vadimk <vadim4j@gmail.com> |
ip tuntap: Added missing commands in usage show, list, lst and help commands were not printed in usage. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
/external/iproute2/ip/iptuntap.c
|
f1a505aca8e44081b388cbde3ddd73cab720f884 |
|
16-Sep-2014 |
vadimk <vadim4j@gmail.com> |
ip tuntap: Add checking if tun/tap mode was set by default This checking was performed only when adding interface but it is needed also when deleting, otherwise the error will be: ioctl(TUNSETIFF): Invalid argument Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
/external/iproute2/ip/iptuntap.c
|
c41e038f48a3da9d39df00614c2f7c9429cae5b1 |
|
23-May-2013 |
Sriram Narasimhan <sriram.narasimhan@hp.com> |
iptuntap: allow creation of multi-queue tun/tap device This patch adds multi_queue option to ip tuntap. This allows IFF_MULTI_QUEUE flag to be specified during tun/tap device creation enabling multi-queue support in tun/tap device. Example: ip tuntap add dev tap0 mode tap multi_queue Signed-off-by: Sriram Narasimhan <sriram.narasimhan@hp.com>
/external/iproute2/ip/iptuntap.c
|
14645ec2310ee7cf6d2f3d5035ac37ec09674e2c |
|
08-Feb-2013 |
Kees van Reeuwijk <reeuwijk@few.vu.nl> |
iproute2: improved error messages This patch improves many error messages as follows: - For incorrect parameters, show the value of the offending parameter, rather than just say that it is incorrect - Rephrased messages for clarity - Rephrased to more `mainstream' english Signed-off-by: Kees van Reeuwijk <reeuwijk@few.vu.nl>
/external/iproute2/ip/iptuntap.c
|
6e30461e73d4321864b49fb4cd6238ec9bb1ba75 |
|
19-May-2012 |
Andreas Henriksson <andreas@fatal.se> |
iproute2: man page and /bin/ip disagree on del vs delete Reported by Robert Henney: > the 'ip' man page does not mention the command "del" at all but does > claim, "As a rule, it is possible to add, delete and show (or list ) objects". > however, 'ip' does not always recognize "delete" as a commend. > > robh@debian:~$ ip tunnel delete > Command "delete" is unknown, try "ip tunnel help". Lets use "delete" in all calls to matches() for consistency. This will make both "del" and "delete" work everywhere. Signed-off-by: Andreas Henriksson <andreas@fatal.se>
/external/iproute2/ip/iptuntap.c
|
e9a927dc08c8e8e70f68f84983c488158afb4a95 |
|
03-Oct-2011 |
Thomas Jarosch <thomas.jarosch@intra2net.com> |
Add missing closedir() call in do_show() Detected by cppcheck. Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
/external/iproute2/ip/iptuntap.c
|
1313ceb4d668d7ea343acb0c573aeae17669ff54 |
|
31-Aug-2011 |
Dan McGee <dan@archlinux.org> |
iptuntap: avoid double open would leak a file handle
/external/iproute2/ip/iptuntap.c
|
580fbd88f75cc9eea0d28a48c025b090eb9419a7 |
|
19-Sep-2009 |
David Woodhouse <dwmw2@infradead.org> |
Add 'ip tuntap' support. This patch provides support for 'ip tuntap', allowing creation and deletion of persistent tun/tap devices.
/external/iproute2/ip/iptuntap.c
|