From 692ccd0e971c9895956c6ef31129536ed14efb9e Mon Sep 17 00:00:00 2001 From: Eric Miller <> Date: Wed, 21 Nov 2007 20:35:58 +0000 Subject: [PATCH] Slight logic change to c_ip() to retain backwards compatibility. --- Info/CDP.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Info/CDP.pm b/Info/CDP.pm index 67369aab..a37dfeca 100644 --- a/Info/CDP.pm +++ b/Info/CDP.pm @@ -161,7 +161,7 @@ sub c_ip { my $addr = $c_addr->{$key}; my $proto = $c_proto->{$key}; 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)); $c_ip{$key} = $ip; @@ -376,7 +376,8 @@ See c_if() entry. =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)