[ixpmanager] Problem with sflow-detect-ixp-bgp-sessions

Rasmus Åberg rasmus at sthix.net
Thu Mar 3 22:19:14 GMT 2016


Excuse my bad debug code :)

Managed to get it working again, thanks!

Was caused by an IPv6 address missing a part of its address on one virtual interface. It was 1:2:3:4:5:6:7 instead of 1:2:3:4:5:6:7:8.

//Rasmus



On 03/03/16 23:06, "ixpmanager on behalf of Nick Hilliard" <ixpmanager-bounces at inex.ie on behalf of nick at inex.ie> wrote:

>this:
>
>> Can't call method "short" on an undefined value at
>> /usr/local/bin/sflow-detect-ixp-bgp-sessions line 206.
>>
>> Line 206:
>>              
>>   $mapping->{6}->{NetAddr::IP->new($rec->{address})->short()} = $rec->{id};
>
>is a different problem to this:
>
>> When debugging a bit and changing the code on line 206 to the following:
>>
>>                 my $foo = NetAddr::IP->new($rec->{address})->short();
>>                 print $foo
>>                 $mapping->{6}->{$foo} == $rec->{id};
>
>> Can't use string ("2001:7f8:3e:0:a500:3:3886:1") as a symbol ref while
>> "strict refs" in use at /usr/local/bin/sflow-detect-ixp-bgp-sessions
>> line 208.
>>
>> ... where line 208 is "print $foo".
>
>The code you added is wrong: you need a ";" after "print $foo".  At the
>moment it is being interpreted as:
>
>my $foo = NetAddr::IP->new($rec->{address})->short();
>print $foo $mapping->{6}->{$foo} == $rec->{id};
>
>I.e. print is attempting to interpret $foo as a file handle.  You also
>used the "==" comparative operator instead of the "=" assignment operator.
>
>Can you change your code to:
>
>--
>print Dumper ($rec);
>my $foo = NetAddr::IP->new($rec->{address})->short();
>print $foo;
>$mapping->{6}->{$foo} = $rec->{id};
>--
>
>When short() aborts, the last entry printed should be an empty $rec
>entry.  Can you post this (removing all sensitive data)?
>
>Nick
>_______________________________________________
>INEX IXP Manager mailing list
>ixpmanager at inex.ie
>https://www.inex.ie/mailman/listinfo/ixpmanager



More information about the ixpmanager mailing list