]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[LLC]: Fix for Bugzilla ticket #5156
authorJochen Friedrich <jochen@scram.de>
Thu, 22 Sep 2005 07:44:55 +0000 (04:44 -0300)
committerArnaldo Carvalho de Melo <acme@mandriva.com>
Thu, 22 Sep 2005 07:44:55 +0000 (04:44 -0300)
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
net/core/dev.c
net/llc/af_llc.c

index c01511e3d0c14a417f4ac025749405c061446e19..37c881070963aec33f184dac0341f7862877ca3b 100644 (file)
@@ -574,6 +574,8 @@ struct net_device *dev_getbyhwaddr(unsigned short type, char *ha)
        return dev;
 }
 
+EXPORT_SYMBOL(dev_getbyhwaddr);
+
 struct net_device *dev_getfirstbyhwtype(unsigned short type)
 {
        struct net_device *dev;
index a75b8f2aab1949e75db4208d086cdbcfe6f155a4..0607cd3fd12ce995d3a6723cfbd45365a0bd4873 100644 (file)
@@ -296,6 +296,12 @@ static int llc_ui_bind(struct socket *sock, struct sockaddr *uaddr, int addrlen)
        rc = -EAFNOSUPPORT;
        if (unlikely(addr->sllc_family != AF_LLC))
                goto out;
+       rc = -ENODEV;
+       rtnl_lock();
+       llc->dev = dev_getbyhwaddr(addr->sllc_arphrd, addr->sllc_mac);
+       rtnl_unlock();
+       if (!llc->dev)
+               goto out;
        if (!addr->sllc_sap) {
                rc = -EUSERS;
                addr->sllc_sap = llc_ui_autoport();