diff --git a/server/dbdata/user.go b/server/dbdata/user.go index 1e344c62..02967b93 100644 --- a/server/dbdata/user.go +++ b/server/dbdata/user.go @@ -69,6 +69,8 @@ func SetUser(v *User) error { // 验证用户登录信息 func CheckUser(name, pwd, group string, ext map[string]interface{}) error { + base.Trace("CheckUser", name, pwd, group, ext) + // 获取登入的group数据 groupData := &Group{} err := One("Name", group, groupData) diff --git a/server/dbdata/userauth_radius.go b/server/dbdata/userauth_radius.go index 6e1a27dc..d52e434a 100644 --- a/server/dbdata/userauth_radius.go +++ b/server/dbdata/userauth_radius.go @@ -9,6 +9,7 @@ import ( "reflect" "time" + "github.com/bjdgyc/anylink/base" "layeh.com/radius" "layeh.com/radius/rfc2865" ) @@ -75,8 +76,9 @@ func (auth AuthRadius) checkUser(name, pwd string, g *Group, ext map[string]inte } } macAddr := ext["mac_addr"].(string) + base.Trace("AuthRadius", ext, macAddr) if macAddr != "" { - err = rfc2865.CallingStationID_SetString(packet, macAddr) + err = rfc2865.CallingStationID_AddString(packet, macAddr) if err != nil { return fmt.Errorf("%s %s", name, "Radius set CallingStationID 出现错误") }