Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] ifconf traversal failure (e.g. intf_loop() fails) #12

Closed
GoogleCodeExporter opened this issue Jun 14, 2015 · 1 comment
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Run "test/dnet/dnet intf show"


What is the expected output? What do you see instead?

The expected output is shown later on (using my patch).  I currently get this 
instead:

fwip0: flags=0x30<BROADCAST,MULTICAST> mtu 1500
dnet: intf_loop: Device not configured


What version of the product are you using? On what operating system?

SVN checkout (but most likely present for some time).  I'm running NetBSD 
-current (5.99.39).


Please provide any additional information below.

I've attached a patch for fix this by correcting the NEXTIFR() macro in intf.c. 
 NetBSD put a sockaddr_storage in the ifreq ifr_ifru union, so using 
sizeof(i->ifr_addr) won't work (it's still sockaddr), but for other systems 
using only sockaddrs, sizeof(ifr_addr) should always equal sizeof(ifr_ifru) 
anyway.

Oh, I didn't notice any max() or MAX() defined or used in libdnet, but the 
patch could be use it if available.  I just didn't see any sense adding it for 
only this, though.

fwip0: flags=0x30<BROADCAST,MULTICAST> mtu 1500
vr0: flags=0x30<BROADCAST,MULTICAST> mtu 1500
        link 00:11:d8:42:94:29
        alias fe80:2::211:d8ff:fe42:9429/64
lo0: flags=0x23<UP,LOOPBACK,MULTICAST> mtu 33192
        inet 127.0.0.1/8
        alias ::1
        alias fe80:3::1/64
ppp0: flags=0x25<UP,POINTOPOINT,MULTICAST> mtu 1500
        inet 192.168.1.2/24 --> 192.168.1.1
        alias fe80:4::2e0:1800:ca:ee7a/64

Original issue reported on code.google.com by katterj...@gmail.com on 21 Sep 2010 at 5:38

Attachments:

@GoogleCodeExporter
Copy link
Author

Verified build on FreeBSD and NetBSD. Sending message to dugsong@ for approval

Original comment by jay.f...@gmail.com on 2 Oct 2010 at 11:52

  • Changed state: Verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant