fix: allow wifi modules to use network aliases for clients never seen on lan

This commit is contained in:
evilsocket 2019-03-17 14:01:30 +01:00
commit 255102c250
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
5 changed files with 15 additions and 10 deletions

View file

@ -274,12 +274,8 @@ func (s *Session) shHandler(args []string, sess *Session) error {
func (s *Session) aliasHandler(args []string, sess *Session) error {
mac := args[0]
alias := str.Trim(args[1])
if s.Lan.SetAliasFor(mac, alias) {
return nil
} else {
return fmt.Errorf("Could not find endpoint %s", mac)
}
s.Lan.SetAliasFor(mac, alias)
return nil
}
func (s *Session) addHandler(h CommandHandler, c *readline.PrefixCompleter) {