Skip to content

Commit

Permalink
Move routes after ip assignment
Browse files Browse the repository at this point in the history
- in case if no default routes on phys iface
some routes are not moved till a route matched own IP
is assigned.

Change-Id: I493396eb5865fd338241569c59a1680818385b58
Closes-Bug: #1786839
  • Loading branch information
alexey-mr committed Oct 23, 2018
1 parent 5ffe93a commit 2a20c7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion containers/vrouter/base/agent-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,6 @@ function init_vhost0() {
# TODO: switch off dhcp on phys_int permanently
kill_dhcp_clients ${phys_int}
fi
set_dev_routes vhost0 "$routes"
echo "INFO: Changing physical interface to vhost in ip table"
echo "$addrs" | while IFS= read -r line ; do
if ! is_dpdk ; then
Expand All @@ -569,6 +568,7 @@ function init_vhost0() {
echo "INFO: set mtu"
ip link set dev vhost0 mtu $mtu
fi
set_dev_routes vhost0 "$routes"
fi
# Remove all routes from phys iface if any.
# One case is centos: it may assign 192.254.0.0/16 to ethX as a Zeroconf route.
Expand Down

0 comments on commit 2a20c7b

Please sign in to comment.