]> git.ipfire.org Git - thirdparty/kea.git/commit
Set source IP address in PktFilterInet::send 2/head
authorNicolas C <nchaigne@capgemini.fr>
Fri, 26 Sep 2014 08:57:47 +0000 (10:57 +0200)
committerNicolas C <nchaigne@capgemini.fr>
Fri, 26 Sep 2014 08:57:47 +0000 (10:57 +0200)
commit6ac36ed7a1d97bcf52ffb2aec7cbf116e58e5803
treebfc01d9f6863cebcf4d37d8caa06fd4d8d7f44ff
parent4ccae9904eccb073a4c8aa3fcb41d29b8a2551bb
Set source IP address in PktFilterInet::send

Perfdhcp can be used with option -l to specify the local address to be
used.

However, when this option is used on a secondary address of an
interface, this doesn't work correctly.

The packets are sent with:
- giaddr = adresse specified (correct)
- source ip address = the interface primary IP address

Here is a patch that correctly sets the source IP address before sending
the packet.
This allows to launch multiple perfdhcp processes at the same time,
sharing the same interface but each using a distinct IP address.
src/lib/dhcp/pkt_filter_inet.cc