Make gateway objects also detect routes with missing RTF_GATEWAY flag
authorPhil Sutter <phil@nwl.cc>
Wed, 17 Dec 2008 01:06:34 +0000 (02:06 +0100)
committerPhil Sutter <phil@nwl.cc>
Wed, 17 Dec 2008 01:37:07 +0000 (02:37 +0100)
commitf85c1ea5a6e935bd66942955e793479bf4381c0a
tree25d614195467f156bba4970254a3d1afcec8b95d
parentd321573c2d2affac9e3cc22fc2f883e50b6a66d7
Make gateway objects also detect routes with missing RTF_GATEWAY flag

This was a bug, not a feature. From the FreeBSD manpage rtentry(9):

| Vt struct sockaddr *rt_gateway;
|
| The "target" of the route, which can either represent a destination in
| its own right (some protocols will put a link-layer address here), or
| some intermediate stop on the way to that destination (if the
| RTF_GATEWAY flag is set).

So for a default route with "dest" and "mask" both zero, either
RTF_GATEWAY is present, or "gate" is zero.
ChangeLog
src/linux.c