Skip to content

Commit

Permalink
Merge pull request xapi-project#6 from robhoes/tap
Browse files Browse the repository at this point in the history
CA-217840: Only call setup-pvs-proxy-rules on vif (not tap) events
  • Loading branch information
thomassa authored Aug 17, 2016
2 parents d4e91bb + 5e31481 commit 156fa0b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scripts/vif-real
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,10 @@ add_to_bridge()
;;
esac

local setup_pvs_proxy_rules=$(xenstore-read "${PRIVATE}/setup-pvs-proxy-rules" 2>/dev/null)
$setup_pvs_proxy_rules add "$PRIVATE" || logger -t scripts-vif "Failed to $setup_pvs_proxy_rules add $PRIVATE"
if [ "${TYPE}" = "vif" ] ; then
local setup_pvs_proxy_rules=$(xenstore-read "${PRIVATE}/setup-pvs-proxy-rules" 2>/dev/null)
$setup_pvs_proxy_rules add "$PRIVATE" || logger -t scripts-vif "Failed to $setup_pvs_proxy_rules add $PRIVATE"
fi

local setup_vif_rules=$(xenstore-read "${PRIVATE}/setup-vif-rules" 2>/dev/null)
$setup_vif_rules $XENOPSD_BACKEND ${dev} $DOMUUID $DEVID filter || logger -t scripts-vif "Failed to setup-vif-rules $XENOPSD_BACKEND ${dev} $DOMUUID $DEVID filter"
Expand All @@ -202,8 +204,10 @@ remove_from_bridge()
{
${IP} link set "${dev}" down || logger -t scripts-vif "Failed to ip link set ${dev} down"

local setup_pvs_proxy_rules=$(xenstore-read "${PRIVATE}/setup-pvs-proxy-rules" 2>/dev/null)
/usr/libexec/xenopsd/setup-pvs-proxy-rules remove "$PRIVATE" || logger -t scripts-vif "Failed to $setup_pvs_proxy_rules remove $PRIVATE"
if [ "${TYPE}" = "vif" ] ; then
local setup_pvs_proxy_rules=$(xenstore-read "${PRIVATE}/setup-pvs-proxy-rules" 2>/dev/null)
/usr/libexec/xenopsd/setup-pvs-proxy-rules remove "$PRIVATE" || logger -t scripts-vif "Failed to $setup_pvs_proxy_rules remove $PRIVATE"
fi

local setup_vif_rules=$(xenstore-read "${PRIVATE}/setup-vif-rules" 2>/dev/null)
$setup_vif_rules $XENOPSD_BACKEND ${dev} $DOMUUID $DEVID clear || logger -t scripts-vif "Failed to setup-vif-rules $XENOPSD_BACKEND ${dev} $DOMUUID $DEVID clear"
Expand Down

0 comments on commit 156fa0b

Please sign in to comment.