-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Looks good to me. I can't immediately see any situation where it would cause problems.
I'm going to pull this into the mainline, and see how it goes. Cheers, Simon. On 18/03/15 16:09, Lung-Pin Chang wrote: > Hi folks, > > Recently we are investigating an issue reported by one of our > customer. > > The problematic unit is a Linux-based box with dual ethernet > ports, and both of them are connected into > > the same network with IPs manually configured within the same > subnet (say, 10.56.78.2/24 & 10.56.78.1/24). > > Routing table on the box now looks like the following: DiskStation> > ip route 10.56.78.0/24 dev eth1 proto kernel scope link src > 10.56.78.2 10.56.78.0/24 dev eth0 proto kernel scope link src > 10.56.78.1 > > When we're trying to offer DHCP leases over eth0 (with > --bind-interfaces), the kernel picks the route via eth1, > > causing mismatch in the IP header and DHCP server entries within > the DHCPACK packet. > > The clients (we've tested dhclient 4.3.2) tossed this DHCPACK, > hence it would be unable to get any lease within the network. > > As the kernel always prefer the first route in this multipath case > (see fib_get_table in include/net/ip_fib.h of kernel source), > > it seems the proper way to mitigate this is to set the outbound > interface via cmsg, > > as done in the broadcast in dhcp_packet() of dhcp.c. > > I've consolidated the cmsg creation in bcast & ucast case into one, > as shown in [1], > > and some quick tests with the patch proved it works with the case > mentioned above. > > Would like to hear your comments of this patch via list, direct > mail or GitHub, thanks! > > [1]: > https://github.com/iamben/dnsmasq/commit/fbd4ff8ebc62bb9ddb9f186a7473087972439a7e > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlULXNkACgkQKPyGmiibgrcecACfUiRKA03gu11EQyslFycyVGp1 1mQAn1hW8a0VJ8PoQ2UMxg5582louRAu =xYI5 -----END PGP SIGNATURE----- _______________________________________________ Dnsmasq-discuss mailing list [email protected] http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
