Skip to content

Commit

Permalink
[LLC]: Fix for Bugzilla ticket #5156
Browse files Browse the repository at this point in the history
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
  • Loading branch information
Jochen Friedrich authored and Arnaldo Carvalho de Melo committed Sep 22, 2005
1 parent 6e2144b commit cf309e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions net/llc/af_llc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit cf309e3

Please sign in to comment.