[ovs-dev] [PATCH] bridge: Fix segfault when updating learning table for deleted port.
Jesse Gross
jesse at nicira.com
Wed Nov 11 17:22:27 PST 2009
Yeah, stupid mistake. I pushed the fix.
Justin Pettit wrote:
> D'oh! Looks good.
>
> --Justin
>
>
> On Nov 11, 2009, at 5:16 PM, Jesse Gross wrote:
>
>
>> A function call using in_port was accidentally moved before the check
>> to see if it is null. in_port can be null if a port was deleted but
>> an update is still pending. This moves the call after the check.
>>
>> Bug #2313
>> ---
>> vswitchd/bridge.c | 9 +++++----
>> 1 files changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
>> index 276f496..fb6a141 100644
>> --- a/vswitchd/bridge.c
>> +++ b/vswitchd/bridge.c
>> @@ -2092,16 +2092,17 @@ bridge_account_flow_ofhook_cb(const flow_t *flow,
>> {
>> struct bridge *br = br_;
>> struct port *in_port;
>> - int vlan;
>> const union odp_action *a;
>>
>> /* Feed information from the active flows back into the learning table
>> * to ensure that table is always in sync with what is actually flowing
>> * through the datapath. */
>> in_port = port_from_dp_ifidx(br, flow->in_port);
>> - vlan = flow_get_vlan(br, flow, in_port, false);
>> - if (in_port && vlan >= 0) {
>> - update_learning_table(br, flow, vlan, in_port);
>> + if (in_port) {
>> + int vlan = flow_get_vlan(br, flow, in_port, false);
>> + if (vlan >= 0) {
>> + update_learning_table(br, flow, vlan, in_port);
>> + }
>> }
>>
>> if (!br->has_bonded_ports) {
>> --
>> 1.6.0.4
>>
>>
>> _______________________________________________
>> dev mailing list
>> dev at openvswitch.org
>> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
>>
>
>
More information about the dev
mailing list