All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bridge] Problem in changed VLAN code can cause systems to hang.
@ 2004-09-09 13:16 Mark Ruijter
  2004-09-09 15:21 ` [Bridge] " David S. Miller
  2004-09-10 12:43 ` [Bridge] " Tommy Christensen
  0 siblings, 2 replies; 15+ messages in thread
From: Mark Ruijter @ 2004-09-09 13:16 UTC (permalink / raw)
  To: Stephen Hemminger, bridge; +Cc: David S. Miller


Stephen,

I noticed that the VLAN code of kernels >=2.6.8 contain the patch needed 
to mirror link state information from the real device to the vlan device.

This however causes the system to hang in combination with net-snmpd.
The last thing that I see is an ioctl(0x8947...

 From the net-snmp code:
---

         if (ioctl(fd, 0x8947, &ifr) >= 0) {
                 new_ioctl_nums = 1;
         } else if (ioctl(fd, SIOCDEVPRIVATE, &ifr) >= 0) {
                 new_ioctl_nums = 0;
         } else {
                 DEBUGMSGTL(("mibII/interfaces", "SIOCGMIIPHY on %s 
failed\n", ifr.ifr_name));
                 return retspeed;
         }

---

I suspected the code below so I commented out the SIOCGMIIPHY line:


  int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
         struct net_device *real_dev = VLAN_DEV_INFO(dev)->real_dev;
         struct ifreq ifrr;
         int err = -EOPNOTSUPP;

         strncpy(ifrr.ifr_name, real_dev->name, IFNAMSIZ);
         ifrr.ifr_ifru = ifr->ifr_ifru;

         switch(cmd) {
         //case SIOCGMIIPHY:
         case SIOCGMIIREG:
         case SIOCSMIIREG:
                 if (real_dev->do_ioctl && netif_device_present(real_dev))
                         err = real_dev->do_ioctl(dev, &ifrr, cmd);
                 break;

         case SIOCETHTOOL:
                 err = dev_ethtool(&ifrr);
         }

         if (!err)
                 ifr->ifr_ifru = ifrr.ifr_ifru;

         return err;
}

This fixes the problem. I didn't bother to check what this call actually 
does and why it doesn't work.

Mark.




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-09-10 23:01 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-09 13:16 [Bridge] Problem in changed VLAN code can cause systems to hang Mark Ruijter
2004-09-09 15:21 ` [Bridge] " David S. Miller
2004-09-09 15:33   ` shemminger
2004-09-09 15:51     ` David S. Miller
2004-09-10 11:56       ` Stephen Hemminger
2004-09-10 12:38         ` Tommy Christensen
2004-09-10 13:17           ` Stephen Hemminger
2004-09-10 13:02         ` Mark Ruijter
2004-09-09 15:54     ` Mark Ruijter
2004-09-09 16:00     ` Ben Greear
2004-09-09 15:34   ` Mark Ruijter
2004-09-10 12:43 ` [Bridge] " Tommy Christensen
2004-09-10 13:14   ` Stephen Hemminger
2004-09-10 13:29     ` Mark Ruijter
2004-09-10 23:01     ` David S. Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.