debugged new changes with forward relation. it works now. mac learning now works on (probably) arbitrary networks though I've only tried it on one-switch networks