debian: Ignore openvswitch-vtep directory generated during packaging.

Signed-off-by: Ben Pfaff <blp@nicira.com>
odp-util: Initialize tun_key and tun_key_mask

tun_key_to_attr() accesses tp_src and tp_dst which are currently
uinitialized.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
debian: Really fix packaging given new dot-files.

commit a5c1096abb1 (debian: Fix debian packaging build failures due to
dot-files in tree.) contained an error that I've made before and should
have noticed.  This commit should really fix the problem.

Signed-off-by: Ben Pfaff <blp@nicira.com>
miniflow: Remove unused values_inline branch from miniflow_move()

The branch is unused as size < sizeof dst->inline_values must
always be true for inlined values. Hitting the branch would lead
to corruption as inline_values is accessed out of bounds.

Remove branch and add assertion.

Cc: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
json: Fix leaked nodes in json_hash_object()

nodes is allocated through shash_sort() but never freed.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
vswitch.xml: Fix a typo.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
test-controller: Rename to ovs-testcontroller, again install.

mininet uses the Open vSwitch controller by default, for testing.

CC: 757761@bugs.debian.org
Reported-at: https://bugs.debian.org/757761
Requested-by: Tomasz Buchert <tomasz.buchert@inria.fr>
Requested-by: Dariusz Dwornikowski <dariusz.dwornikowski@cs.put.poznan.pl>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
build: Use errtrace to simplify travis-ci failure detection

Causes the build script to fail if any command inside the
script returns nonzero.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
odp-util: Only add recirc_id mask to Netlink message if mask is provided

Current unconditional call may result in NULL being passed to
nl_msg_put_u32().

Cc: Andy Zhou <azhou@nicira.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
dpif-netdev: Fix leaked port, port->rxq, port->type in error path

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
[blp@nicira.com added free of port->type]
Signed-off-by: Ben Pfaff <blp@nicira.com>
debian: Fix cross build.

Cross-building openvswitch with debuild -aARCH (or equivalent) fails
because the target architecture is not getting passed to configure.
Thus binaries like ovs-appctl get built using the build host
architecture.

Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS: Add Ed Swierk.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Revert "miniflow: Remove unused values_inline branch from miniflow_move()"

This reverts commit 29d2aa3aa74ab97df0f00af5bddaa12485c1d39a.

Turns out the code was correct but the dynamic nature of miniflow
inline storage was poorly documented.  A following patch fixes the
documentation.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
lib/flow.h: Improve struct miniflow comment and definition.

Miniflows can nowadays be dynamically allocated to different inline
sizes, as done by lib/classifier.c, but this had not been documented
at the struct miniflow definition.

Also, MINI_N_INLINE had a different value for 32-bit and 64-bit builds
due to a historical reason.  Now we use 8 for both.

Finally, use change the storage type of 'values_inline' to uint8_t, as
uint64_t looks kind of wide for a boolean, even though we intend the
bit be carved out from the uint64_t where 'map' resides.

Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
datapath: Fix recirc bug where skb is double freed.

If recirc action is the last action of a action list, the SKB triggers
the recirc will be freed twice. This patch fixes this bug.

Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
tests: Fix race conditions.

These tests had the potential to fail due to statistics not updating
before the test script retrieves them. Fix them by waiting until the
next revalidation cycle.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Fix memory leaks in error paths.

Found by Fortify.

Signed-off-by: yinpeijun <yinpeijun@huawei.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
vtep-ctl: Free error string before return from cmd_remove().

Error string should be freed in all cases.

Found by Coverity.

Signed-off-by: Madhu Challa <challa@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS: Add Madhu Challa.

Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows: define mcgroup IDs for VPORT and other families

dpif-linux.c makes a nl_lookup_genl_mcgroup(OVS_VPORT_FAMILY) that is not
implemented yet on Windows yet. Multicast group is used currently to
subscribe to events related to VPORTs. Whether the exact same mechanism
would be used is unclear yet.

In the interim, we can implement code to support nl_lookup_genl_mcgroup().
and make progress with the other simpler commands.

In this patch, we define a ID for the VPORT MC group and use it. The IDs for
other families were also defined, but without usage, were seen as unclear.
Hence we define only the VPORT group.

Signed-off-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>