bridge: Always call smap_destroy() after smap_init()

This commit fixes a place in bridge.c where smap_destroy() is not
always called after smap_init().  Though there is no memory leak
now, it is necessary to fix it and prevent memory leak in the
future when smap_init() may be modified to allocate dynamic memory.

Reported-by: Ansis Atteka <aatteka@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Delete meters in the right place.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto: Use proper error code when meter_id is out of range.

Use OUT_OF_METERS when given meter_id is greater than what is supported
by the datapath.  Retain the INVALID_METER error code for the meter_ids
outside of the range supported by the specification.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-parse: Set usable protocols in parse_ofp_meter_mod_str__().

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
vswitchd: Clear bfd_status column when bfd is disabled or not supported

This commit makes vswitchd clear the 'bfd_status' column
in ovsdb when bfd is disabled or not supported.

Reported-by: Ansis Atteka <aatteka@nicira.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>