Slight logic change to c_ip() to retain backwards compatibility.

This commit is contained in:
Eric Miller
2007-11-21 20:35:58 +00:00
parent e0aa0835cd
commit 692ccd0e97

View File

@@ -161,7 +161,7 @@ sub c_ip {
my $addr = $c_addr->{$key}; my $addr = $c_addr->{$key};
my $proto = $c_proto->{$key}; my $proto = $c_proto->{$key};
next unless defined $addr; next unless defined $addr;
next unless (defined $proto and $proto eq 'ip'); next if (defined $proto and $proto ne 'ip');
my $ip = join('.',unpack('C4',$addr)); my $ip = join('.',unpack('C4',$addr));
$c_ip{$key} = $ip; $c_ip{$key} = $ip;
@@ -376,7 +376,8 @@ See c_if() entry.
=item $cdp->c_ip() =item $cdp->c_ip()
Returns remote IPV4 address only If $cdp->c_proto() is supported, returns remote IPV4 address only. Otherwise
it will return all addresses.
(B<cdpCacheAddress>) (B<cdpCacheAddress>)