#17274: lldpd not work
---------------------------+----------------------------------
  Reporter:  keyman0413@…  |      Owner:  developers
      Type:  defect        |     Status:  new
  Priority:  normal        |  Milestone:  Chaos Calmer (trunk)
 Component:  packages      |    Version:  Trunk
Resolution:                |   Keywords:  lldpd
---------------------------+----------------------------------

Comment (by anonymous):

 I think I found what the problem is. The current way of running lldpd
 (created by the lldpd init script) is more or less:
     lldpd -I loop -I br-lan -M 4
 This result in
 2014-09-30T14:25:29 [ DBG/interfaces] driver for eth0 is `ag71xx`
 2014-09-30T14:25:29 [ DBG/interfaces] driver for eth1 is `ag71xx`
 2014-09-30T14:25:29 [ DBG/interfaces] driver for br-lan is `bridge`
 2014-09-30T14:25:29 [ DBG/interfaces] driver for wlan0 is `ath9k`
 2014-09-30T14:25:29 [ DBG/interfaces] wlan0 is wireless
 2014-09-30T14:25:29 [ DBG/interfaces] interface br-lan is a bridge
 2014-09-30T14:25:29 [ DBG/interfaces] eth0 is a physical interface
 2014-09-30T14:25:29 [ DBG/interfaces] eth1 is a physical interface
 2014-09-30T14:25:29 [ DBG/interfaces] ifb0 is a physical interface
 2014-09-30T14:25:29 [ DBG/interfaces] wlan0 is a physical interface
 2014-09-30T14:25:29 [ DBG/interfaces] blacklist eth0
 2014-09-30T14:25:29 [ DBG/interfaces] blacklist eth1
 2014-09-30T14:25:29 [ DBG/interfaces] blacklist ifb0
 2014-09-30T14:25:29 [ DBG/interfaces] blacklist wlan0

 If I run instead:
 lldpd -I eth0,wlan0

 the result is:

 2014-09-30T14:27:08 [ DBG/interfaces] driver for eth0 is `ag71xx`
 2014-09-30T14:27:08 [ DBG/interfaces] driver for eth1 is `ag71xx`
 2014-09-30T14:27:08 [ DBG/interfaces] driver for br-lan is `bridge`
 2014-09-30T14:27:08 [ DBG/interfaces] driver for wlan0 is `ath9k`
 2014-09-30T14:27:08 [ DBG/interfaces] wlan0 is wireless
 2014-09-30T14:27:08 [ DBG/interfaces] interface br-lan is a bridge
 2014-09-30T14:27:08 [ DBG/interfaces] eth0 is a physical interface
 2014-09-30T14:27:08 [ DBG/interfaces] eth1 is a physical interface
 2014-09-30T14:27:08 [ DBG/interfaces] ifb0 is a physical interface
 2014-09-30T14:27:08 [ DBG/interfaces] wlan0 is a physical interface
 2014-09-30T14:27:08 [ DBG/interfaces] blacklist eth1
 2014-09-30T14:27:08 [ DBG/interfaces] blacklist ifb0
 2014-09-30T14:27:08 [ DBG/interfaces] blacklist br-lan
 2014-09-30T14:27:08 [ DBG/interfaces] eth0 is an acceptable ethernet
 device
 2014-09-30T14:27:08 [ DBG/interfaces] use ifname and MAC address for eth0
 2014-09-30T14:27:08 [ DBG/interfaces] wlan0 is an acceptable ethernet
 device
 2014-09-30T14:27:08 [ DBG/interfaces] use ifname and MAC address for wlan0
 2014-09-30T14:27:08 [ DBG/interfaces] add management address 217.133.60.98
 2014-09-30T14:27:08 [ DBG/interfaces] add management address
 2001:1418:192::1
 2014-09-30T14:27:08 [ DBG/interfaces] ask ethtool for the appropriate
 MAC/PHY for eth0
 2014-09-30T14:27:08 [ DBG/interfaces] ask ethtool for the appropriate
 MAC/PHY for wlan0
 2014-09-30T14:27:08 [ DBG/interfaces] send PDU to ethernet device eth0
 (fd=9)
 2014-09-30T14:27:08 [ DBG/interfaces] send PDU to ethernet device wlan0
 (fd=10)
 2014-09-30T16:27:08 [INFO/lldpctl] lldpd should resume operations
 2014-09-30T14:27:08 [ DBG/interfaces] receive PDU from ethernet device
 eth0
 2014-09-30T14:27:09 [ DBG/interfaces] receive PDU from ethernet device
 eth0
 2014-09-30T14:27:10 [ DBG/interfaces] receive PDU from ethernet device
 eth0

 So (I may be wrong):
 1) br-lan is discarded because it's a bridge
 2) adding multiple interfaces must be done by a single -I and multiple
 interfaces separated by comma. A new -I will reset the list.

 The issue must be solved in the rc script, I think, here:

         for iface in $ifaces; do
                 local ifname=""
                 if network_get_device ifname "$iface" || [ -e
 "/sys/class/net/$iface" ]; then
                         append args "-I ${ifname:-$iface}"
                 fi
         done

--
Ticket URL: <https://dev.openwrt.org/ticket/17274#comment:1>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to