2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-19 14:37:21 +00:00
Commit Graph

15 Commits

Author SHA1 Message Date
Raju Subramanian
e0edde6fee Global replace of Nicira Networks.
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc.

Feature #10593
Signed-off-by: Raju Subramanian <rsubramanian@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-02 17:08:02 -07:00
Ben Pfaff
896b32721d Fix memory leaks.
Found by valgrind.

Reported-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-25 14:38:10 -07:00
Jesse Gross
2f0dc471d0 route-table: Clear route_notifier after free.
If the routing table is destroyed and re-created then it will
trigger another assertion because route_notifier is not NULL,
even though it has already been freed.
2011-09-28 11:28:37 -07:00
Jesse Gross
f4dc8c5895 route-table: Close netlink notifier before closing nln.
Commit 2ee6545f2b "notifiers: Create
and destroy nln_notifiers." requires callers to explicitly create
and destroy netlink notifiers but route-table only did the creation
part.  This causes an assertion failure any time the netdev for a
vport is destroyed (for example ovs-dpctl show when there is a
tunnel port).

Bug #7464
2011-09-27 16:01:50 -07:00
Ethan Jackson
2ee6545f2b notifiers: Create and destroy nln_notifiers.
This patch changes the interface of netlink-notifier and
rtnetlink-link.  Now nln_notifiers are allocated and destroyed by
the module instead of passed in by callers.  This allows the
definition of nln_notifier to be hidden, and generally cleans up
the code.
2011-09-16 11:22:30 -07:00
Ethan Jackson
18a2378164 notifiers: Rename run and wait functions.
It makes more sense to call nln_notifier_run() and
nln_notifier_wait() simply nln_run() and nln_wait() since they
don't operate on notifiers but the entire nln object.  This patch
changes the nln and the rtnetlink-link modules to the new
convention.
2011-09-16 11:22:30 -07:00
Ethan Jackson
0a811051ff netlink-notifier: Rename rtnetlink code.
This patch renames the rtnetlink module's code to "nln" for
"netlink notifier".  Callers are now required to pass in the
netlink protocol to he newly renamed nln_create() function.
2011-09-01 17:18:52 -07:00
Ethan Jackson
45c8d3a189 lib: Rename rtnetlink.[ch] files.
The only rtnetlink specific functionality contained in the
rtnetlink module is the use of the NETLINK_ROUTE protocol.  This
can easily be passed in by callers.

In preparation for generalization, this patch renames
rtnetlink.[ch] to netlink-notifier.[ch].  Future patches will
complete the transition.
2011-09-01 17:18:51 -07:00
Ben Pfaff
e868fb3d32 util: Don't read over 'size - 1' bytes of source string in ovs_strlcpy().
The blind replacement of strncpy() by ovs_strlcpy() is risky because
strncpy() never reads more bytes from its source string than necessary to
write its destination string, but ovs_strlcpy() and the OpenBSD function
that inspired it both read the entire source string.  This avoids that
problem.

Given that change, we can use ovs_strlcpy() in a few more places, and
this commit does that too.

Coverity #10697,10696,10695,10694,10693,10692,10691,10690.
2011-02-22 16:33:35 -08:00
Ethan Jackson
fca2ffb3a0 lib: Fix off-by-one error in route-table. 2011-02-01 10:30:55 -08:00
Ethan Jackson
b46ccdf582 lib: route-table improvements.
This commit makes several changes to the route_table code used to
populate tunnel_egress_iface.

- It removes name_table code from netdev-vport and puts it into
  route-table.

- It no longer attempts to build the name_table dynamically by
  listening to rtnetlink-link notifications.  Instead it dumps the
  entire table, and uses rtnetlink-link notifications to indicate a
  re-dump is required.

- It forces rtnetlink-link notifications to re-dump the routing
  table.  This fixes an issue where bringing an interface down or
  removing it altogether would not have the expected effect on
  related tunnel_egress_ifaces.
2011-01-31 18:27:34 -08:00
Ben Pfaff
cceb11f5b1 netlink-socket: Add functions for joining and leaving multicast groups.
When this library was originally implemented, support for Linux 2.4 was
important.  The Netlink implementation in Linux only added support for
joining and leaving multicast groups after a socket is bound as of Linux
2.6.14, so the library did not support it either.  But the current version
of Open vSwitch targets Linux 2.6.18 and over, so it's fine to add this
support now, and this commit does so.

This will be used more extensively in upcoming commits.

Reviewed by Justin Pettit.
2011-01-27 09:26:05 -08:00
Ethan Jackson
f0e167f0db route-table: Handle route updates more robustly.
The kernel does not broadcast rtnetlink route messages in all cases
one would expect.  This can cause stale entires to end up in the
route table which may cause incorrect results for
route_table_get_ifindex() queries.  This commit causes rtnetlink
route messages to dump the entire route table on the next
route_table_get_ifindex() query.
2011-01-14 11:24:32 -08:00
Ethan Jackson
db2dede403 route-table: Process route messages more selectively.
This commit cleans up the routing table by preventing it from
processing messages which are not relevant for our purposes.
2011-01-14 11:20:46 -08:00
Ethan Jackson
a132aa969e lib: Simplify rtnetlink routing functionality.
This commit removes the rtnetlink-route module and replaces it with
a much simpler to use route-table module.  The route-table uses
rtnetlink to maintain a routing table which may be used to query
the egress interface of particular addresses.

This commit also converts netdev-vport to use the new route-table
module.
2011-01-14 11:19:32 -08:00