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:
bentele
2016-01-22 06:34:59 +00:00
parent ffadb52dbd
commit 23c909981d

View File

@@ -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;
} }