Something broken with libdnet? Or FreeBSD 9.0-RC1?
GomoR
GomoR at gomor.org
Mon Nov 14 23:16:26 UTC 2011
Hello list,
I was updating one of my Perl module (Net::Libdnet), and came accross a bug under FreeBSD 9.0-RC1 and libdnet.
My setup is one interface configured with multiple aliases. See details at the end of the message.
One host works ok (FreeBSD 8.2-RELEASE), and another fails to find correct IP information (FreeBSD 9.0-RC1).
The main bug is that under 9.0-RC1, libdnet fails to find the correct inet address for the interface. It gets the first alias instead. I don't know if the bug comes from libdnet or 9.0-RC1, so I let knowledgeable people here to look at it (or not).
For those who want to test, you can install libdnet from /usr/ports/net/libdnet.
Host FreeBSD 8.2-RELEASE (ok):
% ifconfig re0
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
ether MAC_ADDR
inet PUBLIC_IP4 netmask 0xffffff00 broadcast PUBLIC_IP4.255
inet6 LOCAL_IP6%re0 prefixlen 64 scopeid 0x1
inet 192.168.0.10 netmask 0xffffffff broadcast 192.168.0.10
[...many aliases...]
inet6 PUBLIC_IP6::2 prefixlen 128
inet6 PUBLIC_IP6::3 prefixlen 128
inet6 PUBLIC_IP6::4 prefixlen 128
inet6 PUBLIC_IP6::5 prefixlen 128
inet6 PUBLIC_IP6::1 prefixlen 56
% dnet intf get re0
re0: flags=0x31<UP,BROADCAST,MULTICAST> mtu 1500
inet PUBLIC_IP4/24
link MAC_ADDR
alias fe80:1::21c:c0ff:feca:1178/64
alias 192.168.0.10
[...many aliases...]
alias PUBLIC_IP6::2/0
alias PUBLIC_IP6::3/0
alias PUBLIC_IP6::4/0
alias PUBLIC_IP6::5/0
alias PUBLIC_IP6::1/0
Host FreeBSD 9.0-RC1 (not ok):
% ifconfig re0
re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
ether MAC_ADDR
inet 192.168.2.10 netmask 0xffffffff broadcast 192.168.2.10
[...many aliases...]
inet 192.168.1.148 netmask 0xffffff00 broadcast 192.168.1.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
% dnet intf get re0
re0: flags=0x31<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.2.10
link MAC_ADDR
alias 192.168.2.11
alias 192.168.2.12
alias 192.168.2.13
alias 192.168.2.14
alias 192.168.1.148 # Correct inet address
--
^ ___ ___ http://www.GomoR.org/ <-+
| / __ |__/ Senior Security Engineer |
| \__/ | \ ---[ zsh$ alias psed='perl -pe ' ]--- |
+--> Net::Frame <=> http://search.cpan.org/~gomor/ <---+
More information about the freebsd-stable
mailing list