The TAP interfaces need the same iptables rules as the VIF, without it,
traffic will not be forwarded to/from them is the default FORWARD policy
is DROP/REJECT
Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
;;
esac
-if [ "$type_if" = vif ]; then
- handle_iptable
-fi
+handle_iptable
call_hooks vif post
frob_iptable()
{
- if [ "$command" == "online" ]
+ if [ "$command" == "online" -o "$command" == "add" ]
then
local c="-I"
else
iptables "$c" FORWARD -m physdev --physdev-is-bridged --physdev-out "$dev" \
-j ACCEPT 2>/dev/null
- if [ "$command" == "online" -a $? -ne 0 ]
+ if [ \( "$command" == "online" -o "$command" == "add" \) -a $? -ne 0 ]
then
log err "iptables setup failed. This may affect guest networking."
fi