summaryrefslogtreecommitdiff
path: root/lib/ovs-router.h
Commit message (Collapse)AuthorAgeFilesLines
* sparse: Add guards to prevent FreeBSD-incompatible #include order.Ben Pfaff2017-12-221-0/+1
| | | | | | | | | | FreeBSD insists that <sys/types.h> be included before <netinet/in.h> and that <netinet/in.h> be included before <arpa/inet.h>. This adds guards to the "sparse" headers to yield a warning if this order is violated. This commit also adjusts the order of many #includes to suit this requirement. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
* ovs-router: introduce pkt-mark.Pravin B Shelar2017-01-281-2/+4
| | | | | | | | | | OVS router is basically partial copy of linux kernel FIB. kernel routing table uses skb-mark along with usual routing parameters. Following patch brings in support for skb-mark to ovs-router so that we can lookup route for given skb-mark. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jarno Rajahalme <jarno@ovn.org>
* sflow: use ovs route API to get source IP address.Pravin B Shelar2016-03-241-1/+0
| | | | | Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* tunneling: Handle multiple ip address for given device.Pravin B Shelar2016-03-241-1/+1
| | | | | | | | | | | | Device can have multiple IP address but netdev_get_in4/6() returns only one configured IPv6 address. Following patch fixes it. OVS router is also updated to return source ip address for given destination, This is required when interface has multiple IP address configured. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* ovs-router: fix compile error on FreeBSDKevin Lo2015-12-041-0/+2
| | | | | | | | FreeBSD needs to include netinet/in.h to define struct in6_addr. Signed-off-by: Kevin Lo <kevlo@FreeBSD.org> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* route: support IPv6 and use IPv4-mapped addressesThadeu Lima de Souza Cascardo2015-10-131-3/+5
| | | | | | | | This adds support for IPv6 in ovs-router and route-table. IPv4 is stored in ovs-router using IPv4-mapped addresses. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* ovs-router: non-Linux supportYAMAMOTO Takashi2014-12-101-0/+3
| | | | | | | | | | Refactor ovs-router so that it can work with non-Linux platforms at least in some extent, using the existing route-table code as a fallback. Known restriction: for such platforms, "ovs/router/show" command does not show "Cached" kernel routes. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* dpctl: Fix crash.Pravin B Shelar2014-11-211-1/+1
| | | | | | | | | | ovs-dpctl crashed due to uninitialized router classifier. To fix this issue move ovs router initialization to route table module. Reported-by: Madhu Challa <challa@noironetworks.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
* ovs-router: Fix build on NetBSDYAMAMOTO Takashi2014-11-111-11/+0
| | | | | | | | | | | | Split the linux-specific part of ovs-router.h into ovs-router-linux.h. The breakage was introduced by commit d9b4ebc5d15202bedad06969353435a4c1951c71 ("route-table: Use classifier to store routing table.") Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Acked-by: Ben Pfaff <blp@nicira.com>
* route-table: Use classifier to store routing table.Pravin B Shelar2014-11-031-0/+43
Rather than using hmap for storing routing entries we can directly use classifier which has support for priority and wildcard entries. This makes route lookup lockless. This help when we use route lookup for native tunneling. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>