View | Details | Raw Unified | Return to bug 10324
Collapse All | Expand All

(-)vps-functions.orig (-2 / +5 lines)
Lines 171-179 Link Here
171
	if ! ${IP_CMD} route list ${1} | grep "$1 dev venet0" > /dev/null 2>&1; then
171
	if ! ${IP_CMD} route list ${1} | grep "$1 dev venet0" > /dev/null 2>&1; then
172
		if [ -n "${VE_ROUTE_SRC_DEV}" ]; then
172
		if [ -n "${VE_ROUTE_SRC_DEV}" ]; then
173
			device="dev ${VE_ROUTE_SRC_DEV}"
173
			device="dev ${VE_ROUTE_SRC_DEV}"
174
			src_addr=`ip route get ${1} oif ${device} | head -n 1 | awk -F 'src ' '{print $2}'`
175
		else
176
			src_addr=`ip route get ${1} | head -n 1 | awk -F 'src ' '{print $2}'`
174
		fi
177
		fi
175
		src_addr=`ip route list table local ${device} | grep '^local' |
178
		#src_addr=`ip route list table local ${device} | grep '^local' |
176
			cut -d' ' -f2 | grep -v '^127\.' | head -n 1`
179
		#	cut -d' ' -f2 | grep -v '^127\.' | head -n 1`
177
		if [ -z "${src_addr}" ]; then
180
		if [ -z "${src_addr}" ]; then
178
			vzerror "Unable to get source ip [${device}]" ${VZ_CANT_ADDIP}
181
			vzerror "Unable to get source ip [${device}]" ${VZ_CANT_ADDIP}
179
		fi
182
		fi

Return to bug 10324