File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,7 +73,8 @@ def isPreConfiged(self):
7373 preCfged = False
7474 for br in self .syscfg .env .nics :
7575 if not self .netcfg .isNetworkDev (br ):
76- raise CloudInternalException ("%s is not a network device, is it down?" % br )
76+ logging .debug ("%s is not a network device, is it down?" % br )
77+ return False
7778 if not self .netcfg .isBridge (br ):
7879 raise CloudInternalException ("%s is not a bridge" % br )
7980 preCfged = True
Original file line number Diff line number Diff line change @@ -591,15 +591,16 @@ def addFWFramework(brname):
591591 try :
592592 refs = execute ("iptables -n -L " + brfw + " |grep " + brfw + " | cut -d \( -f2 | awk '{print $1}'" ).strip ()
593593 if refs == "0" :
594- execute ("iptables -A FORWARD -i " + brname + " -m physdev --physdev-is-bridged -j " + brfw )
595- execute ("iptables -A FORWARD -o " + brname + " -m physdev --physdev-is-bridged -j " + brfw )
594+ execute ("iptables -I FORWARD -i " + brname + " -j DROP" )
595+ execute ("iptables -I FORWARD -o " + brname + " -j DROP" )
596+ execute ("iptables -I FORWARD -i " + brname + " -m physdev --physdev-is-bridged -j " + brfw )
597+ execute ("iptables -I FORWARD -o " + brname + " -m physdev --physdev-is-bridged -j " + brfw )
596598 phydev = execute ("brctl show |grep " + brname + " | awk '{print $4}'" ).strip ()
597599 execute ("iptables -A " + brfw + " -m physdev --physdev-is-bridged --physdev-out " + phydev + " -j ACCEPT" )
598600 execute ("iptables -A " + brfw + " -m state --state RELATED,ESTABLISHED -j ACCEPT" )
599601 execute ("iptables -A " + brfw + " -m physdev --physdev-is-bridged --physdev-is-out -j " + brfwout )
600602 execute ("iptables -A " + brfw + " -m physdev --physdev-is-bridged --physdev-is-in -j " + brfwin )
601- execute ("iptables -A FORWARD -i " + brname + " -j DROP" )
602- execute ("iptables -A FORWARD -o " + brname + " -j DROP" )
603+
603604
604605 return True
605606 except :
You can’t perform that action at this time.
0 commit comments