Andrew Beekhof wrote:
On 1/25/06, David Lee <[EMAIL PROTECTED]> wrote:
BasicSanityCheck has never worked under Solaris: the sum of several issues
each of which needs tackling one by one. I've done a few of those in
recent weeks. But yet others remain.
My next target is "findif". This works OK(-ish) in typical production
mode, for which the address is typically on the local networks(s). But
BSC's particular use of it is with a _remote_ address (10.253.252.251)
which typically would be over a "default" route.
For remote/default addresses the command "route -n get 10.253.252.251"
on Solaris returns:
destination: default
mask: default
(i.e. value is literally the string "default").
I propose the attached patch which, on seeing a mask "default", assumes
"0.0.0.0" and takes it from there. (See comment in patch.)
(Oh! If only there were a decent API to read the routing table...)
Any comments, anyone? (I'm not entirely happy with the patch. But given
that this whole area is in practice sub-ideal anyway, is it at least "good
enough"?)
If its Solaris specific, I say do what you gotta do (but perhaps
#ifdef it out for everyone else).
I disagree.
ifdefs just clutter the code, and the string default won't appear except
if it means 0.0.0.0. So, I'd say go ahead without the ifdefs. Putting
comments explaining that this is needed for Solaris is fine though.
--
Alan Robertson <[EMAIL PROTECTED]>
"Openness is the foundation and preservative of friendship... Let me
claim from you at all times your undisguised opinions." - William
Wilberforce
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/