
Hi Mark,
This worked for quite a number of devices I've checked, which all had different MACs per port. Indeed I have one that sees at least one other port as "port 1", and was planning on looking into that, pretty convinced it had to do with this too. I'll see later if this fixes it :-)
It works when MAC addresses are distinct, it fails misleadingly when they are the same. Found another case, this one a mismatch on a *local* port in a 'neighbours' report.
It should not be difficult to see if the SQL SELECT returned a single or a number of matches on a MAC address. When more than one port matches a query the result should be discarded. It will still work reliably for devices where each port has a distinct MAC address.
Yup, that is a good idea indeed.
Also the fix didn't solve my problem as I remembered it wrongly - the switch side is ok but the linux box's interface is shown wrong - the switch however sees the correct one. Will need to debug this further.
Tom