diff options
author | Jochen Friedrich <jochen@scram.de> | 2005-09-22 03:44:55 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-09-22 03:44:55 -0400 |
commit | cf309e3fb863b7a245b91f816193957f6daf786f (patch) | |
tree | dea98fdd919c726857d63b9a0f60e9ba89ca32d8 /net | |
parent | 6e2144b76840be09924de1626e2dcd7b315f75b3 (diff) |
[LLC]: Fix for Bugzilla ticket #5156
Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 2 | ||||
-rw-r--r-- | net/llc/af_llc.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index c01511e3d0c1..37c881070963 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) | |||
574 | return dev; | 574 | return dev; |
575 | } | 575 | } |
576 | 576 | ||
577 | EXPORT_SYMBOL(dev_getbyhwaddr); | ||
578 | |||
577 | struct net_device *dev_getfirstbyhwtype(unsigned short type) | 579 | struct net_device *dev_getfirstbyhwtype(unsigned short type) |
578 | { | 580 | { |
579 | struct net_device *dev; | 581 | struct net_device *dev; |
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index a75b8f2aab19..0607cd3fd12c 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) | |||
296 | rc = -EAFNOSUPPORT; | 296 | rc = -EAFNOSUPPORT; |
297 | if (unlikely(addr->sllc_family != AF_LLC)) | 297 | if (unlikely(addr->sllc_family != AF_LLC)) |
298 | goto out; | 298 | goto out; |
299 | rc = -ENODEV; | ||
300 | rtnl_lock(); | ||
301 | llc->dev = dev_getbyhwaddr(addr->sllc_arphrd, addr->sllc_mac); | ||
302 | rtnl_unlock(); | ||
303 | if (!llc->dev) | ||
304 | goto out; | ||
299 | if (!addr->sllc_sap) { | 305 | if (!addr->sllc_sap) { |
300 | rc = -EUSERS; | 306 | rc = -EUSERS; |
301 | addr->sllc_sap = llc_ui_autoport(); | 307 | addr->sllc_sap = llc_ui_autoport(); |