summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* iproute: extend route get for mpls routesflag-namesRoopa Prabhu2017-07-181-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch extends route get to support mpls specific route attributes like RTA_NEWDST. Input: RTA_DST - input label RTA_NEWDST - labels in packet for multipath selection By default the getroute handler returns matched nexthop label, via and oif With fibmatch keyword (RTM_F_FIB_MATCH flag), full matched route is returned. example: $ip -f mpls route show 101 nexthop as to 102/103 via inet 172.16.2.2 dev virt1-2 nexthop as to 302/303 via inet 172.16.12.2 dev virt1-12 201 nexthop as to 202/203 via inet6 2001:db8:2::2 dev virt1-2 nexthop as to 402/403 via inet6 2001:db8:12::2 dev virt1-12 $ip -f mpls route get 103 RTNETLINK answers: Network is unreachable $ip -f mpls route get 101 101 as to 102/103 via inet 172.16.2.2 dev virt1-2 $ip -f mpls route get as to 302/303 101 101 as to 302/303 via inet 172.16.12.2 dev virt1-12 $ip -f mpls route get fibmatch 103 RTNETLINK answers: Network is unreachable $ip -f mpls route get fibmatch 101 101 nexthop as to 102/103 via inet 172.16.2.2 dev virt1-2 nexthop as to 302/303 via inet 172.16.12.2 dev virt1-12 Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
* remove duplicated #include'sStephen Hemminger2017-07-126-6/+0
| | | | Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
* update kernel headers from 4.13-pre-rc1Stephen Hemminger2017-07-123-1/+90
| | | | Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
* ip: change flag names to an arrayStephen Hemminger2017-07-071-87/+65
| | | | | | | | | | For the most of the address flags, use a table of bit values rather than open coding every value. This allows for easier inevitable expansion of flags. This also fixes the missing stable-privacy flag. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
* Merge branch 'master' into net-nextStephen Hemminger2017-07-051-1/+1
|\
| * v4.12.0v4.12.0Stephen Hemminger2017-07-051-1/+1
| |
* | Merge branch 'master' into net-nextStephen Hemminger2017-07-056-6/+268
|\ \ | |/
| * iptunnel: add support for mpls/ip to ipip tunnelsKrister Johansen2017-07-052-3/+23
| | | | | | | | | | Original-Author: Simon Horman <simon.horman@netronome.com> Signed-off-by: Krister Johansen <kjlx@templeofstupid.com>
| * iptunnel: add support for mpls/ip to sit tunnelsKrister Johansen2017-07-054-7/+17
| | | | | | | | | | Original-Author: Simon Horman <simon.horman@netronome.com> Signed-off-by: Krister Johansen <kjlx@templeofstupid.com>
| * iptunnel: document mode parameter for sit tunnelsKrister Johansen2017-07-051-1/+9
| | | | | | | | | | Original-Author: Simon Horman <simon.horman@netronome.com> Signed-off-by: Krister Johansen <kjlx@templeofstupid.com>
| * Add new man page for tc actions.Lucas Bates2017-07-051-0/+221
| | | | | | | | | | | | | | | | This page is to highlight all operations and options that are applicable to all tc actions. Signed-off-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
| * tc: updated ife man page.Roman Mashak2017-06-301-1/+4
| | | | | | | | | | | | Explain when skbmark encoding may fail. Signed-off-by: Roman Mashak <mrv@mojatatu.com>
* | bpf: allow requesting XDP HW offloadJakub Kicinski2017-06-274-4/+14
| | | | | | | | | | | | | | Let XDP link set command request that the program be offloaded. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
* | bpf: add xdpdrv for requesting XDP driver modeJakub Kicinski2017-06-274-4/+16
| | | | | | | | | | | | | | | | Allow user to select XDP DRV_MODE flag by using xdpdrv keyword instead of xdp or xdpgeneric. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
* | bpf: print xdp offloaded modeJakub Kicinski2017-06-271-0/+2
| | | | | | | | | | | | | | Add interpretation of XDP_ATTACHED_HW mode on dump. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
* | bpf: Add support for IFLA_XDP_PROG_IDMartin KaFai Lau2017-06-271-3/+9
| | | | | | | | | | | | | | | | | | | | This patch adds support to the newly added IFLA_XDP_PROG_ID. ./ip link show dev eth0 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 xdpgeneric/id:2 qdisc [...] Signed-off-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
* | update kernel headers from net-nextStephen Hemminger2017-06-275-5/+24
| | | | | | | | Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
* | Merge branch 'master' into net-nextStephen Hemminger2017-06-277-25/+19
|\ \ | |/
| * bpf: indicate lderr when bpf_apply_relo_data failsDaniel Borkmann2017-06-271-1/+3
| | | | | | | | | | | | | | | | When LLVM wrongly generates a rodata relo entry (llvm BZ #33599), then just bail out instead of probing for prog w/o reloc, which will fail in this case anyway. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
| * man: ip-route.8: Mention that lower metric means higher priorityLukas Braun2017-06-271-1/+1
| | | | | | | | | | | | This is quite counter-intuitive when using the 'preference' keyword. Signed-off-by: Lukas Braun <koomi@moshbit.net>
| * man: Collect names of man pages automaticallyPhil Sutter2017-06-273-22/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | As it turned out, forgetting to add a man page to the respective Makefile when introducing it is a common mistake. Overcome this once and for all by using $(wildcard) function in Makefiles. Fixes: 7124942942e53 ("genl: add manpage") Fixes: 958cd210942c8 ("ifcfg: add manpage") Fixes: e1b7f883e50de ("man: add documentation for IPv6 SR commands") Fixes: 1949f82cdf62c ("Introduce ip vrf command") Fixes: 535194a172d23 ("tipc: add peer remove functionality") Signed-off-by: Phil Sutter <phil@nwl.cc>
| * tc: updated tc-u32 man page to reflect skip_sw and skip_hw parameters.Roman Mashak2017-06-211-0/+11
| | | | | | | | Signed-off-by: Roman Mashak <mrv@mojatatu.com>
| * tc: fixed typo in usage text.Roman Mashak2017-06-211-1/+1
| | | | | | | | Signed-off-by: Roman Mashak <mrv@mojatatu.com>
* | tc: m_tunnel_key: add csum/nocsum optionJiri Benc2017-06-162-1/+38
| | | | | | | | | | | | Allows control of UDP zero checksum. Signed-off-by: Jiri Benc <jbenc@redhat.com>
* | tc: m_tunnel_key: reformat the usage textJiri Benc2017-06-161-1/+7
| | | | | | | | | | | | | | Adding new tunnel key fields would cause the usage line overflow 80 chars. Make the usage text similar to other commands. Signed-off-by: Jiri Benc <jbenc@redhat.com>
* | tc: don't print error message on miss when parsing action with defaultJiri Pirko2017-06-161-14/+22
| | | | | | | | | | | | | | | | | | | | In case default control action parsing takes place, it is ok to miss. So don't print error message. Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions") Reported-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Tested-by: Jiri Benc <jbenc@redhat.com>
* | update headers to get TCA_TUNNEL_CSUMStephen Hemminger2017-06-162-0/+2
| | | | | | | | Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
* | Merge branch 'master' into net-nextStephen Hemminger2017-06-162-8/+5
|\ \ | |/
| * iproute: fix compilation issue with older glibcDavid Lebrun2017-06-161-7/+4
| | | | | | | | | | | | | | | | | | | | If a header that includes linux/in6.h is included before iproute's utils.h, then iproute2 fails to compile on older glibc versions. Fixes: e8493916a8ede9970732e33ea52d30b83071f401 ("iproute: add support for SR-IPv6 lwtunnel encapsulation") Reported-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David Lebrun <david.lebrun@uclouvain.be>
| * ip neigh: allow flush FAILED neighbour entryHangbin Liu2017-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | After upstream commit 5071034e4af7 ('neigh: Really delete an arp/neigh entry on "ip neigh delete" or "arp -d"'), we could delete a single FAILED neighbour entry now. But `ip neigh flush` still skip the FAILED entry. Move the filter after first round flush so we can flush FAILED entry on fixed kernel and also do not keep retrying on old kernel. Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
* | Merge branch 'master' into net-nextStephen Hemminger2017-06-156-30/+71
|\ \ | |/
| * ip: mroute: Add table output to show commandDonald Sharp2017-06-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the user specifies `table all` or `table 0` to the `ip mroute show` command we dump the entirety of the known mroute tables. Without some sort of divisor to tell us what table we are looking at the command is useless. Add `Table: <vrf name>` to the output of 'ip mroute show table 0' Follow the convention established by 'ip route show table 0' for when to display Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
| * link_gre6: really support encaplimit optionNicolas Dichtel2017-06-151-0/+12
| | | | | | | | | | | | | | This option is documented in gre6 help, but was not supported. Fixes: af89576d7a8c ("iproute2: GRE over IPv6 tunnel support.") Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
| * xfrm: get #define's from linux includesStephen Hemminger2017-06-143-23/+49
| | | | | | | | | | | | | | Use linux/ipsec.h and linux/in.h to get the definition of IP related protocols. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
| * iproute: Remove useless check for nexthop keyword when setting RTA_OIFJakub Sitnicki2017-06-141-7/+5
| | | | | | | | | | | | | | | | | | When modifying a route we set the RTA_OIF attribute only if a device was specified with "dev" or "oif" keyword. But for some unknown reason we earlier alternatively check also for the presence of "nexthop" keyword, even though it has no effect. So remove the pointless check. Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
* | more bpf header updatesStephen Hemminger2017-06-141-1/+7
| | | | | | | | Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
* | bridge: Distinguish between externally learned vs offloaded FDBsArkadi Sharshevsky2017-06-142-0/+7
| | | | | | | | | | | | | | | | | | Distinguish between externally learned vs offloaded FDBs. This is done in order to indicate that FDBs added by software was successfully offloaded. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
* | tc: add support for TRAP actionJiri Pirko2017-06-081-0/+3
| | | | | | | | Signed-off-by: Jiri Pirko <jiri@mellanox.com>
* | tc: gact: fix control action parsingJiri Pirko2017-06-081-7/+2
| | | | | | | | | | | | | | | | parse_action_control helper does advancing of the arg inside. So don't do it outside. Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions") Signed-off-by: Jiri Pirko <jiri@mellanox.com>
* | tc: flower: add support for matching on ip tos and ttlOr Gerlitz2017-06-082-1/+91
| | | | | | | | | | | | | | | | Allow users to set flower classifier filter rules which include matches for ip tos and ttl. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com>
* | update headers from net-next (bpf and tc)Stephen Hemminger2017-06-082-0/+48
| | | | | | | | | | | | More BPF and tc_action values. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
* | ip: Add IFLA_EVENT output to ip monitorVlad Yasevich2017-06-051-0/+23
| | | | | | | | | | | | | | | | Add IFLA_EVENT output so that event types can be viewed with 'monitor' command. This gives a little more information for why a given message was received. Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
* | ip: extend route get to return matching fib routeRoopa Prabhu2017-06-052-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uses newly introduced RTM_GETROUTE flag RTM_F_FIB_MATCH to return a matching fib route. Introduces 'fibmatch' keyword to ip route get. ipv4: ---- $ip route show default via 192.168.0.2 dev eth0 10.0.14.0/24 nexthop via 172.16.0.3 dev dummy0 weight 1 nexthop via 172.16.1.3 dev dummy1 weight 1 $ip route get 10.0.14.2 10.0.14.2 via 172.16.1.3 dev dummy1 src 172.16.1.1 cache $ip route get fibmatch 10.0.14.2 10.0.14.0/24 nexthop via 172.16.0.3 dev dummy0 weight 1 nexthop via 172.16.1.3 dev dummy1 weight 1 ipv6: ---- $ip -6 route show 2001:db9:100::/120 metric 1024 nexthop via 2001:db8:2::2 dev dummy0 weight 1 nexthop via 2001:db8:12::2 dev dummy1 weight 1 $ip -6 route get 2001:db9:100::1 2001:db9:100::1 from :: via 2001:db8:12::2 dev dummy1 \ src 2001:db8:12::1 metric 1024 pref medium $ip -6 route get fibmatch 2001:db9:100::1 2001:db9:100::/120 metric 1024 nexthop via 2001:db8:12::2 dev dummy1 weight 1 nexthop via 2001:db8:2::2 dev dummy0 weight 1 Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Acked-by: David Ahern <dsahern@gmail.com>
* | updated headers from net-nextStephen Hemminger2017-06-052-4/+12
| | | | | | | | Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
* | Merge branch 'master' into net-nextStephen Hemminger2017-06-055-3/+116
|\ \ | |/
| * iplink: Update usage in help messageEli Cohen2017-06-052-2/+4
| | | | | | | | | | | | | | | | | | | | Add to usage message a description of how to configure Infiniband node and port GUIDs. Also modify the man page to emphasize the GUIDs are configured for Infiniband VFs. Fixes: d91fb3f4c7e4 ("Add support for configuring Infiniband GUIDs") Signed-off-by: Eli Cohen <eli@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
| * ip: link add vxcan supportOliver Hartkopp2017-06-053-1/+112
| | | | | | | | | | | | | | | | | | | | Since commit a8f820a380a2a06 ('can: add Virtual CAN Tunnel driver (vxcan)') for Linux 4.12 a virtual CAN tunnel driver analogue to veth is available in Linux. This patch adds the ability to create vxcan device pairs. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
* | Merge branch 'master' into net-nextStephen Hemminger2017-05-306-81/+266
|\ \ | |/
| * ip vrf: Add show commandDavid Ahern2017-05-302-5/+159
| | | | | | | | | | | | Add show command to list all configured VRF and their table ids. Signed-off-by: David Ahern <dsahern@gmail.com>
| * ip address: Change print_linkinfo_brief to take filter as an inputDavid Ahern2017-05-303-17/+23
| | | | | | | | | | | | | | Change print_linkinfo_brief to take the filter as an input arg. If the arg is NULL, use the global filter in ipaddress.c. Signed-off-by: David Ahern <dsahern@gmail.com>