- 07 Apr, 2015 6 commits
-
-
Stephen Hemminger authored
Conflicts: man/man8/ip-route.8.in
-
Pavel Šimerda authored
Result of the following command: sed -ri 's/\. /. /g' man/*/* Signed-Off-By: Pavel Šimerda <psimerda@redhat.com>
-
Vadim Kochan authored
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Output of the usage was shifted be cause of missing TAB Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
If '-nm' specified that do not fail if there is no default class names file in /etc/iproute2. Changed default class name file cls_names -> tc_cls. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
- 24 Mar, 2015 23 commits
-
-
Lubomir Rintel authored
This allows querying and setting the route preference. It's usually set from the IPv6 Neighbor Discovery Router Advertisement messages. Introduced in "ipv6: expose RFC4191 route preference via rtnetlink", enqueued for Linux 4.1. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
-
Eric W. Biederman authored
- Pull in the uapi mpls.h - Update rtnetlink.h to include the mpls rtnetlink notification multicast group. - Define AF_MPLS in utils.h if it is not defined from elsewhere as is done with AF_DECnet The address syntax for multiple mpls labels is a complete invention. When I looked there seemed to be no wide spread convention for talking about an mpls label stack in text for. Sometimes people did: "{ Label1, Label2, Label3 }", sometimes people would do: "[ label3, label2, label1 ]", and most of the time label stacks were not explicitly shown at all. The syntax I wound up using, so it would not have spaces and so it would visually distinct from other kinds of addresses is. label1/label2/label3 Where label1 is the label at the top of the label stack and label3 is the label at the bottom on the label stack. When there is a single label this matches what seems to be convention with other tools. Just print out the numeric value of the mpls label. The netlink protocol for labels uses the on the wire format for a label stack. The ttl and traffic class are expected to be 0. Using the on the wire format is common and what happens with other address types. BGP when passing label stacks also uses this technique with the exception that the ttl byte is not included making each label in a BGP label stack 3 bytes instead of 4. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
-
Eric W. Biederman authored
This attribute is like RTA_DST except it specifies the destination address to place on a packet when it leaves the host. For ip based protocols this is destination NAT and not a common part of forwarding. For protocols like MPLS label swapping is something that typically happens on every hop. There is likely to be a RTA_NEWSRC at some point so RTA_NEWDST is printed as "as to" and can be specified either as "as to" or just "as" Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
-
Eric W. Biederman authored
Add support for the RTA_VIA attribute that specifies an address family as well as an address for the next hop gateway. To make it easy to pass this reorder inet_prefix so that it's tail is a proper RTA_VIA attribute. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
-
Eric W. Biederman authored
-
Eric W. Biederman authored
Add the functions family_name and read_family to convert an address family to a string and to convernt a string to an address family. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
-
Eric W. Biederman authored
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
-
Eric W. Biederman authored
This avoids build warnings when AF_PACKET support is added to rt_addr_n2a. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
-
Eric W. Biederman authored
For some address families (like AF_PACKET) it is helpful to have the length when prenting the address. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
-
Daniel Borkmann authored
This work adds the tc frontend for kernel commit e2e9b6541dd4 ("cls_bpf: add initial eBPF support for programmable classifiers"). A C-like classifier program (f.e. see e2e9b6541dd4) is being compiled via LLVM's eBPF backend into an ELF file, that is then being passed to tc. tc then loads, if any, eBPF maps and eBPF opcodes (with fixed-up eBPF map file descriptors) out of its dedicated sections, and via bpf(2) into the kernel and then the resulting fd via netlink down to cls_bpf. cls_bpf allows for annotations, currently, I've used the file name for that, so that the user can easily identify his filter when dumping configurations back. Example usage: clang -O2 -emit-llvm -c cls.c -o - | llc -march=bpf -filetype=obj -o cls.o tc filter add dev em1 parent 1: bpf run object-file cls.o classid x:y tc filter show dev em1 [...] filter parent 1: protocol all pref 49152 bpf handle 0x1 flowid x:y cls.o I placed the parser bits derived from Alexei's kernel sample, into tc_bpf.c as my next step is to also add the same support for BPF action, so we can have a fully fledged eBPF classifier and action in tc. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@plumgrid.com>
-
Stephen Hemminger authored
Lastest features
-
Daniel Borkmann authored
Include the bpf.h uapi header file. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-
Madhu Challa authored
Joining multicast group on ethernet level via "ip maddr" command would not work if we have an Ethernet switch that does igmp snooping since the switch would not replicate multicast packets on ports that did not have IGMP reports for the multicast addresses. Linux vxlan interfaces created via "ip link add vxlan" have the group option that enables then to do the required join. By extending ip address command with option "autojoin" we can get similar functionality for openvswitch vxlan interfaces as well as other tunneling mechanisms that need to receive multicast traffic. example: ip address add 224.1.1.10/24 dev eth5 autojoin ip address del 224.1.1.10/24 dev eth5
-
Scott Feldman authored
On ip route print dump, label externally offloaded routes with "external". Offloaded routes are flagged with RTNH_F_EXTERNAL, a recent additon to net-next. For example: $ ip route default via 192.168.0.2 dev eth0 11.0.0.0/30 dev swp1 proto kernel scope link src 11.0.0.2 external 11.0.0.4/30 via 11.0.0.1 dev swp1 proto zebra metric 20 external 11.0.0.8/30 dev swp2 proto kernel scope link src 11.0.0.10 external 11.0.0.12/30 via 11.0.0.9 dev swp2 proto zebra metric 20 external 12.0.0.2 proto zebra metric 30 external nexthop via 11.0.0.1 dev swp1 weight 1 nexthop via 11.0.0.9 dev swp2 weight 1 12.0.0.3 via 11.0.0.1 dev swp1 proto zebra metric 20 external 12.0.0.4 via 11.0.0.9 dev swp2 proto zebra metric 20 external 192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.15 Signed-off-by: Scott Feldman <sfeldma@gmail.com> Reviewed-by: Jiri Pirko <jiri@resnulli.us>
-
Stephen Hemminger authored
Use sanitized headers from 4.0.0-rc3
-
Daniel Borkmann authored
Next argument after the tc opcode/verdict is optional, using NEXT_ARG() requires to have another argument after that one otherwise tc will bail out. Therefore, we need to advance to the next argument manually as done elsewhere. Fixes: 86ab59a6 ("tc: add support for BPF based actions") Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jiri Pirko <jiri@resnulli.us>
-
Vadim Kochan authored
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Roopa Prabhu authored
commit f3a2ddc1 ("lib utils: Use helpers to get AF bit/byte len") used a wrong family or family of zero in the default case during af_bit_len calculation causing ip route commands to fail with below error Error: an inet prefix is expected rather than "10.0.2.14/24". Reported-by: Sven-Haegar Koch <haegar@sdinet.de> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
-
philipp@redfish-solutions.com authored
Don't insert newline in -o (oneline) mode; print mark as hex. Oneline mode is supposed to force all output to be on oneline and machine-parsable, but this isn't the case for "ip xfrm" as shown: % ip -o xfrm monitor ... src 0.0.0.0/0 dst 0.0.0.0/0 \ dir out priority 2051 ptype main \ mark -1879048191/0xffffffff tmpl src 203.0.130.10 dst 198.51.130.30\ proto esp reqid 16384 mode tunnel\ ... as that's 2 lines, not one. Also, the "mark" is shown in signed decimal, but the mask is in hex. This is confusing: let's use hex for both. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
-
Roopa Prabhu authored
This patch replaces exits with returns in several iproute2 commands. This fixes `ip -batch -force` to not exit but continue on errors. $cat c.txt route del 1.2.3.0/24 dev eth0 route del 1.2.4.0/24 dev eth0 route del 1.2.5.0/24 dev eth0 route add 1.2.3.0/24 dev eth0 $ip -force -batch c.txt RTNETLINK answers: No such process Command failed c.txt:2 RTNETLINK answers: No such process Command failed c.txt:3 Reported-by: Sven-Haegar Koch <haegar@sdinet.de> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
-
Andy Gospodarek authored
While looking at the manpage, I noticed a reference to 'embedded' that was added by this commit: commit d611682a Author: John Fastabend <john.r.fastabend@intel.com> Date: Thu Sep 13 23:50:36 2012 -0700 iproute2: bridge: finish removing replace option in man pages I no longer see any reference to the 'embedded' option in any c- or h-files, so it seems worthwhile to remove. Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com> CC: John Fastabend <john.r.fastabend@intel.com>
-
Mark Einon authored
Where used in the ip tool, the 'show' option always has the synonyms 'list' and 'lst', except for ip-token and ip-addrlabel, which are missing 'lst'. Add this as a synonym for these commands. Signed-off-by: Mark Einon <mark.einon@gmail.com>
-
- 15 Mar, 2015 8 commits
-
-
Vadim Kochan authored
It is possible to use class names from file /etc/iproute2/cls_names which tc will use when showing class info: # tc/tc -nm class show dev lo class htb 1:10 parent 1:1 leaf 10: prio 0 rate 5Mbit ceil 5Mbit burst 15Kb cburst 1600b class htb 1:1 root rate 6Mbit ceil 6Mbit burst 15Kb cburst 1599b class htb web#1:20 parent 1:1 leaf 20: prio 0 rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b class htb 1:2 root rate 6Mbit ceil 6Mbit burst 15Kb cburst 1599b class htb 1:30 parent 1:1 leaf 30: prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b class htb voip#1:40 parent 1:2 leaf 40: prio 0 rate 5Mbit ceil 5Mbit burst 15Kb cburst 1600b class htb 1:50 parent 1:2 leaf 50: prio 0 rate 3Mbit ceil 6Mbit burst 15Kb cburst 1599b class htb 1:60 parent 1:2 leaf 60: prio 0 rate 1Kbit ceil 6Mbit burst 15Kb cburst 1599b or to specify via file path: # tc/tc -nm -cf /tmp/cls_names class show dev lo Class names file contains simple "maj:min name" structure: 1:20 web 1:40 voip Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Observed on the Linux 3.18: # ip netns RTNETLINK answers: Operation not supported net0 CC: Nicolas Dichtel <nicolas.dichtel@6wind.com> Fixes: d182ee13 ("ipnetns: allow to get and set netns ids") Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Added funcs to get AF_XXX len in bit/bytes and replace places where switch(AF_XXX) is used for this. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Eric Dumazet authored
Socket cookies are 64bit, even if ss happens to be a 32bit binary, running on a 64 bit host. Signed-off-by: Eric Dumazet <edumazet@google.com>
-
Vadim Kochan authored
Ugly change but it allows to specify sport/dport w/o ':' # ss dport = 80 and sport = 44862 Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Also added some trivial form of the ID as "major:minor", just for visualisation of explained words. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Vadim Kochan authored
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
- 28 Feb, 2015 3 commits
-
-
Vadim Kochan authored
Added some clarification why 'ip link set netns' can not change network namespace for some kind of devices. Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
-
Daniel Borkmann authored
Left-overs when copying this over from cls_bpf. ;) Lets remove them. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Cc: Jiri Pirko <jiri@resnulli.us>
-
Ebben Aries authored
Add missing GUE/FOU manpages to Makefile Signed-off-by: Ebben Aries <exa@fb.com>
-