asazernik/click — pull request #1 by asazernik (2014-03-21 21:26:18+00:00)
Title: AddressInfo: Only do magic lookup of device etheraddr for special syntax

The documentation in addressinfo.hh indicates that a device name can be
substituted for an explicit ip/ipv6/ethernet address only if followed by
a ':' suffix that matches the query_* method. However, the
current behavior is to do the lookup if the ':' suffix matches OR
if there is no such suffix. Among other things, this affected
EtherAddressArg::parse().

This is a problem because several methods in linuxmodule/anydevice.cc
(most notably lookup_unknown) fall back to matching devname() to a linux
net_device's ethernet address if name matching fails. In one case I saw,
when two devices came up simultaneously with the same ethernet address,
FromDevice::device_notifier_hook() would associate a FromDevice with the
wrong one of the two devices if its NETDEV_UP event arrived first.