70_STV: fix of using more than one NIC without assigned IP
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@10587 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -86,6 +86,7 @@ sub getMAC4IP($)
|
|||||||
my $IP = shift;
|
my $IP = shift;
|
||||||
my @interfaces = IO::Interface::Simple->interfaces;
|
my @interfaces = IO::Interface::Simple->interfaces;
|
||||||
foreach my $if (@interfaces) {
|
foreach my $if (@interfaces) {
|
||||||
|
next unless defined ($if->address);
|
||||||
if ($if->address eq $IP) {
|
if ($if->address eq $IP) {
|
||||||
return $if->hwaddr;
|
return $if->hwaddr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user