From: Jochen Friedrich Date: Thu, 22 Sep 2005 07:44:55 +0000 (-0300) Subject: [LLC]: Fix for Bugzilla ticket #5156 X-Git-Tag: v2.6.14-rc3~103^2^2~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=cf309e3fb863b7a245b91f816193957f6daf786f;p=linux-2.6-omap-h63xx.git [LLC]: Fix for Bugzilla ticket #5156 Signed-off-by: Jochen Friedrich Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/net/core/dev.c b/net/core/dev.c index c01511e3d0c..37c88107096 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -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; diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index a75b8f2aab1..0607cd3fd12 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c @@ -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();