#NEWLINE# def _add_chain( self , port , direction ) : #NEWLINE# #INDENT# chain_name = self . _port_chain_name ( chain_name , direction ) #NEWLINE# self . _add_chain_by_name_v4v6 ( chain_name ) #NEWLINE# device = self . _get_device_name ( port ) #NEWLINE# jump_rule = [ ( '-m physdev --%s %s --physdev-is-bridged -j $%s' % ( self . IPTABLES_DIRECTION [ direction ] , device , SG_CHAIN ) ) ] #NEWLINE# self . _add_rules_to_chain_v4v6 ( 'FORWARD' , jump_rule , jump_rule , comment = ic . VM_INT_SG ) #NEWLINE# jump_rule = [ ( '-m physdev --%s %s --physdev-is-bridged -j $%s' % ( self . IPTABLES_DIRECTION [ direction ] , device , chain_name ) ) ] #NEWLINE# self . _add_rules_to_chain_v4v6 ( SG_CHAIN , jump_rule , jump_rule , comment = ic . SG_TO_VM_SG ) #NEWLINE# if ( direction == firewall . EGRESS_DIRECTION ) : #NEWLINE# #INDENT# self . _add_rules_to_chain_v4v6 ( 'INPUT' , jump_rule , jump_rule , comment = ic . INPUT_TO_SG )