|
|
@ -28,7 +28,7 @@ func main() {
|
|
|
|
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", "10.0.0.15", "IP after change")
|
|
|
|
oldmac := flag.String("oldmac", "", "MAC before change")
|
|
|
|
oldmac := flag.String("oldmac", "", "MAC before change")
|
|
|
|
newmac := flag.String("newmac", "52:54:00:12:34:aa", "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")
|
|
|
|
proxy := flag.String("proxy", "1", "Number of the proxy switch")
|
|
|
|
proxy := flag.String("proxy", "1", "Number of the proxy switch")
|
|
|
|
pidfile := flag.String("pidfile", "", "Location to write the pid to")
|
|
|
|
pidfile := flag.String("pidfile", "", "Location to write the pid to")
|
|
|
@ -36,7 +36,7 @@ func main() {
|
|
|
|
flag.Parse()
|
|
|
|
flag.Parse()
|
|
|
|
log.SetLevel(log.Level(*logLvl))
|
|
|
|
log.SetLevel(log.Level(*logLvl))
|
|
|
|
OldMac, _ = net.ParseMAC(*oldmac)
|
|
|
|
OldMac, _ = net.ParseMAC(*oldmac)
|
|
|
|
NewMac, _ = net.ParseMAC(*newmac)
|
|
|
|
NewMac = util.GenerateMac(*newmac)
|
|
|
|
OldIP = net.ParseIP(*oldip).To4()
|
|
|
|
OldIP = net.ParseIP(*oldip).To4()
|
|
|
|
NewIP = net.ParseIP(*newip).To4()
|
|
|
|
NewIP = net.ParseIP(*newip).To4()
|
|
|
|
log.SetFormatter(&log.TextFormatter{
|
|
|
|
log.SetFormatter(&log.TextFormatter{
|
|
|
|