@ -41,7 +41,7 @@ func main() {
// Get command line arguments
// Get command line arguments
logLvl := flag . Int ( "log" , 4 , "allowed: 5 (debug), 4 (info), 3 (warning), 2 (error), 1 (fatal)" )
logLvl := flag . Int ( "log" , 4 , "allowed: 5 (debug), 4 (info), 3 (warning), 2 (error), 1 (fatal)" )
oldIP := flag . String ( "oldip" , "" , "IP before change" )
oldIP := flag . String ( "oldip" , "" , "IP before change" )
newIP := flag . String ( "newip" , " 10.0.0.15 ", "IP after change" )
newIP := flag . String ( "newip" , " ", "IP after change" )
oldMAC := flag . String ( "oldmac" , "" , "MAC before change" )
oldMAC := flag . String ( "oldmac" , "" , "MAC before change" )
newMAC := flag . String ( "newmac" , "" , "MAC after change" )
newMAC := flag . String ( "newmac" , "" , "MAC after change" )
passthrough := flag . Bool ( "passthrough" , false , "Whether to pass every traffic through" )
passthrough := flag . Bool ( "passthrough" , false , "Whether to pass every traffic through" )
@ -78,7 +78,9 @@ func main() {
c2 , VmReader , VmWriter = cmd . Start ( * sockProxy )
c2 , VmReader , VmWriter = cmd . Start ( * sockProxy )
go pipeForward ( cmd . In )
go pipeForward ( cmd . In )
go pipeForward ( cmd . Out )
go pipeForward ( cmd . Out )
sendDHCPRequest ( dhcp4 . Discover , net . IPv4zero )
if NewIP == nil {
sendDHCPRequest ( dhcp4 . Discover , net . IPv4zero )
}
if * sockMain != "-" {
if * sockMain != "-" {
c1 . WaitH ( )
c1 . WaitH ( )
}
}