- 01 Dec, 2010 3 commits
-
-
Dan Smith authored
This patch adds save and restore commands to "ip route". Save dumps the RTNL stream to stdout which can then be passed to restore later. This may be helpful in some normal situations, and will allow C/R to migrate the routing information in userspace. Tweaking of the stream can be done by userspace helpers to convert between versions and adjust things like device indexes when restoring routes in a different environment. By factoring out some of the common bits of print_route() into filter_nlmsg(), the "save" command can use the same selection logic as "list," allowing the caller to save only specific routes as necessary. The only change since the RFC is the addition of manpage and doc material. Signed-off-by: Dan Smith <danms@us.ibm.com>
-
Gregoire Baron authored
Add the iproute2 support for the ACT_CSUM action. Can be used as following, certainly in conjunction with the ACT_PEDIT action (pedit): # In order to DNAT (stateless) IPv4 packet from 192.168.1.100 to # 0x12345678 (18.52.86.120), and update the IPv4 header checksum and # the UDP checksum (the last one, only if the packet is UDP). tc filter add eth0 prio 1 protocol ip parent ffff: \ u32 match ip src 192.168.1.100/32 flowid :1 \ action pedit munge offset 16 u32 set 0x12345678 \ pipe csum ip and udp # In order to alter destination address of IPv6 TCP packets from fc00::1 # and correct the TCP checksum (nothing happened? except maybe for # checksums in the TCP payload ...). tc filter add eth0 prio 1 protocol ipv6 parent ffff: \ u32 match ip6 src fc00::1/128 match ip6 protocol 0x06 0xff flowid :1 \ action pedit munge offset 24 u32 set 0x12345678 \ pipe csum tcp
-
Ben Greear authored
The default remains at 10 for backwards compatibility. For instance: # ip addr flush dev eth2 *** Flush remains incomplete after 10 rounds. *** # ip -l 20 addr flush dev eth2 *** Flush remains incomplete after 20 rounds. *** # ip -loops 0 addr flush dev eth2 # This is useful for getting rid of large numbers of IP addresses in scripts. Signed-off-by: Ben Greear <greearb@candelatech.com>
-
- 30 Nov, 2010 6 commits
-
-
Sridhar Samudrala authored
Add support for 'mode' parameter when creating a macvtap device. This allows a macvtap device to be created in bridge, private or the default vepa modes. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> ------------------------------------------------------------------- Acked-by: Arnd Bergmann <arnd@arndb.de>
-
Andreas Schwab authored
Print directly to the file instead of going through a buffer. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
-
Changli Gao authored
We can use rxhash to classify the traffic into flows. As rxhash maybe supplied by NIC or RPS, it is cheaper. Signed-off-by: Changli Gao <xiaosuo@gmail.com> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
-
Timo Teräs authored
Similar to tunnel side: accept dotted-quad and number formats. Use regular number for printing the key. Signed-off-by: Timo Teräs <timo.teras@iki.fi>
-
Timo Teräs authored
Print GRE key as a regular number. It is not really an IPv4 address and this is also how Cisco and Juniper treats GRE keys. Do keep the parsing of dotted-quad format for backwards compatibility. Signed-off-by: Timo Teräs <timo.teras@iki.fi>
-
Mike Frysinger authored
iptables dropped the xtables_set_revision() function around version 1.4.9, so set the rev directly ourselves. This should be compatible back to the original version m_xt itself is designed for. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-
- 29 Nov, 2010 1 commit
-
-
Petr Sabata authored
-
- 28 Nov, 2010 1 commit
-
-
Stephen Hemminger authored
Use the available libraries for mapping from interface index to name or type. This should speed up display with lots of interfaces
-
- 18 Nov, 2010 1 commit
-
-
Stephen Hemminger authored
The subdirectory makefiles need Config file to exist. Therefore create it, then run make clean, then remove it.
-
- 21 Oct, 2010 1 commit
-
-
Stephen Hemminger authored
Use santized headers from 2.6.36 release
-
- 13 Sep, 2010 1 commit
-
-
Ulrich Weber authored
display socket policy direction Signed-off-by: Ulrich Weber <uweber@astaro.com>
-
- 25 Aug, 2010 1 commit
-
-
Stephen Hemminger authored
Bug reported where priorities of GRED DP's are ignored. The option parsing sets opt then memset was clearing these values.
-
- 23 Aug, 2010 7 commits
-
-
Eric Dumazet authored
Le lundi 23 août 2010 à 10:33 -0700, Stephen Hemminger a écrit : > I think this breaks the wraparound detection code in this command. > > OK lets fix the bug only, before adding 64bit counters capabilities. Thanks [PATCH] iproute2: add 64bit arches support to ifstat ifstat assumes IFLA_STATS fields are "unsigned long", but they are __u32. This fix is needed to let ifstat run on 64bit arches. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
-
Stephen Hemminger authored
In recent kernels, net_device_stats is not exposed and the code shoulf have used rt_link_statistics. Also, fix use of sprintf with user supplied value.
-
Eric Dumazet authored
Adds support for RTA_MARK rt attribute added in linux-2.6.36 $ ip route get ADDR mark 4 192.168.20.110 dev eth1 src 192.168.20.108 mark 4 cache mtu 1500 advmss 1460 hoplimit 64 $ ip route get 192.168.20.108 from ADDR iif STRING mark 256 local 192.168.20.108 from 192.168.20.110 dev lo src 192.168.20.108 mark 0x100 cache <local,src-direct> iif eth1 $ ip route list cache [ADDR] mark NUMBER Hexadecimal output if mark >= 16 null marks are not displayed. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
-
Stephen Hemminger authored
-
Stephen Hemminger authored
-
Ulrich Weber authored
iproute_get will return cloned routes for IPv4 and cloned as well non-cloned routes for IPv6. Therefore RTM_F_CLONED flag should not be checked for iproute_get routes. Check in print_route will always fail because valid values are 0 and 1. Signed-off-by: Ulrich Weber <uweber@astaro.com>
-
Ben Greear authored
The old 'ip addr flush' logic had several flaws: * It reversed logic for primary v/s secondary flags (though, it sort of worked right anyway) * The code tried to remove secondaries and then primaries, but in practice, it always removed one primary per loop, which not at all efficient. * The filter logic in the core would run only the first filter in most cases. * If you used '-s -s', the ifa_flags member would be modified, which could make future filters fail to function fine. This patch attempts to fix all of these issues. Tested-by: Brian Haley <brian.haley@hp.com> Signed-off-by: Ben Greear <greearb@candelatech.com>
-
- 04 Aug, 2010 1 commit
-
-
Stephen Hemminger authored
-
- 02 Aug, 2010 2 commits
-
-
Stephen Hemminger authored
The u32 key match was incorrect byte order when using ether source or destination address matching.
-
Andreas Henriksson authored
Fixes problems with xtables based MARK target ("ipt" module). When tc loads the "ipt" (xt) module it kept the symbols local, this made loading of libxtables not find the required struct. currently ipt/xt is the only tc action module. iproute2 never seem to do dlclose. hopefully the modules doesn't export more symbols then needed. In this situation hopefully the RTLD_GLOBAL flag won't hurt us. I've been using this patch in the Debian package of iproute for the last 3 weeks and noone has complained. ( This fixes http://bugs.debian.org/584898 ) Signed-off-by: Andreas Henriksson <andreas@fatal.se>
-
- 01 Aug, 2010 2 commits
-
-
Steve Fink authored
> On closer inspection, it appears that ss -p does a quadratic scan. It > rescans every entry in /proc/*/fd/* repeatedly (once per listening > port? per process? I don't remember what I figured out.) > > I humbly suggest that this is not a good idea. Yep, this is junk. Please give this patch a try: ss: Avoid quadradic complexity with '-p' Scan the process list of open sockets once, and store in a hash table to be used by subsequent find_user() calls. Reported-by: Steve Fink <sphink@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-
Mike Frysinger authored
The tc program searches LIBDIR by default for the .dist files, and that defaults to /usr/lib. But the netem subdir has /lib/ hardcoded which means the default build+install results in the files not being found. Further, these are plain text files which are read at runtime, so it doesn't make sense to give them executable bits. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-
- 30 Jul, 2010 1 commit
-
-
Stephen Hemminger authored
If basic match has no tree of matches underneath then print_ematch would core dump.
-
- 23 Jul, 2010 9 commits
-
-
Stephen Hemminger authored
Add all current values. Since if_arp.h is included, get rid of ifdefs'. Make table constant.
-
Mike Frysinger authored
Recent gcc doesn't like it when you cast char pointers to uint16_t pointers and then dereference it. So use memcpy() instead and let gcc take care of optimizing things away (when appropriate). This should also fix alignment issues on arches where gcc packs the char pointer tighter than 16bits. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-
Petr Lautrbach authored
This patch adds ipv6 filter priority/traffic class function static int parse_ip6_class(int *argc_p, char ***argv_p, struct tc_u32_sel *sel) shifting filter value to 5th bit and ignoring "at" as header position is exactly given. Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
-
Mike Frysinger authored
The recent commit "iproute2: add option to build m_xt as a tc module" (ab814d63) looks like it wrongly included debug changes in the install target. So drop the `echo` so the tc binary actually gets installed again. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-
Arnd Hannemann authored
Get ip rule parsing of "dsfield" in sync with ip route parsing and manual page. Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
-
Ben Greear authored
The do_multirule logic was broken in batch mode because it expected the preferred_family to be AF_INET or AF_INET6, but it then assigned it to RTNL_FAMILY_IPMR or RTNL_FAMILY_IP6MR. So, the next iteration of the batch processing, it failed the check for AF_INET or AF_INET6. Signed-off-by: Ben Greear <greearb@candelatech.com>
-
Ulrich Weber authored
otherwise "if ((int)val == -1)" will never match on 64 bit systems Signed-off-by: Ulrich Weber <uweber@astaro.com>
-
Ulrich Weber authored
as already done in IPv4 and metrics code part Signed-off-by: Ulrich Weber <uweber@astaro.com>
-
Ulrich Weber authored
Before IPv6 routing cache entries were always displayed if additional tables beside MAIN and LOCAL are installed. Signed-off-by: Ulrich Weber <uweber@astaro.com>
-
- 09 Jun, 2010 1 commit
-
-
Patrick McHardy authored
commit 44a5293c1c47b8c32d9bb0756660ea5d4802acf2 Author: Patrick McHardy <kaber@trash.net> Date: Tue Apr 13 17:03:47 2010 +0200 ip: add support for multicast rules Signed-off-by: Patrick McHardy <kaber@trash.net>
-
- 19 May, 2010 2 commits
-
-
Jan Engelhardt authored
`ip -s link` shows interface counters truncated to 32 bit. This is because interface statistics are transported only in 32-bit quantity to userspace. This commit adds recognition for the new IFLA_STATS64 attribute that exports them in full 64 bit. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
-
Stephen Hemminger authored
Version for 2.6.35 version on -next
-