[LLC]: Fix for Bugzilla ticket #5156

Signed-off-by: Jochen Friedrich <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
Jochen Friedrich 2005-09-22 04:44:55 -03:00 • committed by Arnaldo Carvalho de Melo
commit cf309e3fb8
2 changed files with 8 additions and 0 deletions

View 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();