#NEWLINE# def prepare_port_filter( self , port ) : #NEWLINE# #INDENT# LOG . debug ( 'Preparing device (%s) filter' , port [ 'device' ] ) #NEWLINE# self . _remove_chains ( ) #NEWLINE# self . _set_ports ( port ) #NEWLINE# self . _enable_netfilter_for_bridges ( ) #NEWLINE# self . _setup_chains ( ) #NEWLINE# return self . iptables . apply ( )