mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
Commit 3e912ffcbb (netdev: Add 'change_seq' back to netdev.) added per-
netdev change number for indicating status change. Future commits used
this change number to optimize the netdev status update to database.
However, the work also introduced the bug in the following scenario:
- assume interface eth0 has address 1.2.3.4, eth1 has adddress 10.0.0.1.
- assume tunnel port p1 is set with remote_ip=10.0.0.5.
- after setup, 'ovs-vsctl list interface p1 status' should show the
'tunnel_egress_iface="eth1"'.
- now if the address of eth1 is change to 0 via 'ifconfig eth1 0'.
- expectedly, after change, 'ovs-vsctl list interface p1 status' should
show the 'tunnel_egress_iface="eth0"'
However, 'tunnel_egress_iface' will not be updated on current master.
This is in that, the 'netdev-vport' module corresponding to p1 does
not react to routing related changes.
To fix the bug, this commit adds a change sequence number in the route-
table module and makes netdev-vport check the sequence number for
tunnel status update.
Bug #1240626
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
59 lines
1.1 KiB
C
59 lines
1.1 KiB
C
/* Copyright (c) 2012, 2013, 2014 Nicira, Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at:
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License. */
|
|
|
|
#include <config.h>
|
|
#include "route-table.h"
|
|
|
|
#include "compiler.h"
|
|
|
|
bool
|
|
route_table_get_name(ovs_be32 ip OVS_UNUSED, char name[IFNAMSIZ] OVS_UNUSED)
|
|
{
|
|
name[0] = '\0';
|
|
return false;
|
|
}
|
|
|
|
bool
|
|
route_table_get_ifindex(ovs_be32 ip OVS_UNUSED, int *ifindex)
|
|
{
|
|
*ifindex = 0;
|
|
return false;
|
|
}
|
|
|
|
uint64_t
|
|
route_table_get_change_seq(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
void
|
|
route_table_register(void)
|
|
{
|
|
}
|
|
|
|
void
|
|
route_table_unregister(void)
|
|
{
|
|
}
|
|
|
|
void
|
|
route_table_run(void)
|
|
{
|
|
}
|
|
|
|
void
|
|
route_table_wait(void)
|
|
{
|
|
}
|