Hello, I'm requesting feedback on the following bugfix:
http://cr.opensolaris.org/~okie/6727748/ This fixes CR 6727748: nwam fails to update dns information on wireless link. I'd love to get comments back as soon as possible, preferably by the end of the day tomorrow, 7/31. Notes from the CR: The problem is that [when run after the dhcp lease is obtained] net-svc chooses not to update /etc/resolv.conf, based on the output of /sbin/netstrategy. So why does that output indicate that dhcp is not in use when it really is? The problem is that on startup, nwamd plumbs all interfaces. When first plumbed, the bge driver initially reports the link state as up (IFF_RUNNING is set) in all cases, and then reports a change in state if in fact no cable is plugged in. So nwamd sees the initial state, and tried to bring up the bge interface (preferring wired over wireless). When nwamd sees the link state go down, it does a 'dhcp release' on the bge interface, and brings up the wireless interface instead. However, the dhcp release does not cause the interface to be taken down (the IFF_UP flag is left on). So the wireless interface obtains its lease, and nwamd execs net-svc. net-svc runs /sbin/netstrategy, which uses some minimal logic to determine the 'primary' interface, and then checks if dhcp is in use on that interface. The determination of the primary interface is the problem: it chooses the first non-loopback, non-virtual interface that has IFF_UP set on it. In this case, that's the bge interface; and dhcp is not running on the dhcp interface. Having determined that the net strategy is 'none', the utility then returns 'none' for both primary interface and strategy. The plan to fix this is to modify the primary interface selection logic: look for both IFF_UP and a non-zero address. As a fallback, keep track of the first interface that would have matched under the old rules as well; if no better match (i.e. one with a non-zero address) is found, go ahead and return the one with the 0.0.0.0 address. Thanks! renee _______________________________________________ networking-discuss mailing list [email protected]
