Another bug with netmasked aliases (with fix)

Max Laier max at love2party.net
Wed Dec 8 12:06:29 PST 2004


On Tuesday 07 December 2004 15:59, Ruslan Ermilov wrote:
> Hi Max,
>
> I played today with "netmasked aliases", and found what
> appears to be another bug.
>
> Adding an alias to the Ethernet interface with the same
> netmask results in this address not being pingable from
> this host -- it just spits ARP requests to the wire and
> never hears back (most Ethernets are simplex devices).
>
> I knew what the fix should look like, and then quickly
> found a ready to commit solution in OpenBSD rev. 1.47.
>
> When testing the attached patch, make sure you do *not*
> have a (host) route for the alias being added.

Took a little longer, busy times :-\

I didn't have this change in my carp patches (and was actually banging my head 
as it solves a long-standing problem) - Thanks.

Any reason you didn't include the following (also part of OpenBSD rev. 1.47)?:

|       /*
|        * make sure to set rt->rt_ifa to the interface
|        * address we are using, otherwise we will have trouble
|        * with source address selection.
|        */
|       ifa = &ia->ia_ifa;
|       if (ifa != rt->rt_ifa) {
|               IFAFREE(rt->rt_ifa);
|               ifa->ifa_refcnt++;
|               rt->rt_ifa = ifa;
|       }


Updated diff attached. Not sure if it makes any difference?

-- 
/"\  Best regards,                      | mlaier at freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier at EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News
-------------- next part --------------
A non-text attachment was scrubbed...
Name: if_ether.c.diff
Type: text/x-diff
Size: 1293 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20041208/6175b452/if_ether.c.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20041208/6175b452/attachment.bin


More information about the freebsd-net mailing list