Subject: | insufficient error handling in IO::Socket::Netlink::Generic |
Date: | Fri, 13 Dec 2013 10:13:31 -0800 |
To: | bug-Socket-Netlink [...] rt.cpan.org |
From: | Sergiy Lozovsky <sergiy.lozovsky [...] gmail.com> |
Hi,
IO::Socket::Netlink::Generic->register_family_name( "VXE" );
my $genlsock = IO::Socket::Netlink::Generic->new or die "socket: $!";
If VXE module is not installed, I get following error:
"Expected nlmsg_type == NETLINK_GENERIC at ./ptest.pl line 10"
Which is extremely misleading. It should be something like "Invalid
family" or "Family is not available".
From what I understand, Netlink responds with an Error message (Type 2),
which is not handled properly. Error code should be communicated back to
the caller.
Thanks,
Sergiy.