port numbering bug fix

fixes #312 
warn needs to be imported from mininet.log