Commit cf309e3f authored by Jochen Friedrich's avatar Jochen Friedrich Committed by Arnaldo Carvalho de Melo

[LLC]: Fix for Bugzilla ticket #5156

Signed-off-by: default avatarJochen Friedrich <jochen@scram.de>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
parent 6e2144b7
...@@ -574,6 +574,8 @@ struct net_device *dev_getbyhwaddr(unsigned short type, char *ha) ...@@ -574,6 +574,8 @@ struct net_device *dev_getbyhwaddr(unsigned short type, char *ha)
return dev; return dev;
} }
EXPORT_SYMBOL(dev_getbyhwaddr);
struct net_device *dev_getfirstbyhwtype(unsigned short type) struct net_device *dev_getfirstbyhwtype(unsigned short type)
{ {
struct net_device *dev; struct net_device *dev;
......
...@@ -296,6 +296,12 @@ static int llc_ui_bind(struct socket *sock, struct sockaddr *uaddr, int addrlen) ...@@ -296,6 +296,12 @@ static int llc_ui_bind(struct socket *sock, struct sockaddr *uaddr, int addrlen)
rc = -EAFNOSUPPORT; rc = -EAFNOSUPPORT;
if (unlikely(addr->sllc_family != AF_LLC)) if (unlikely(addr->sllc_family != AF_LLC))
goto out; 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) { if (!addr->sllc_sap) {
rc = -EUSERS; rc = -EUSERS;
addr->sllc_sap = llc_ui_autoport(); addr->sllc_sap = llc_ui_autoport();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment