[Kea-users] kea source ip

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] kea source ip

itay cohen
does some now know how to change the source ip of dhcp messages with a hook ?

_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] kea source ip

Francis Dupont
> does some now know how to change the source ip of dhcp messages with a hook
> ?

=> setRemoteAddr(newaddr) on the received packet should do this...

Regards

Francis Dupont <[hidden email]>
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] kea source ip

itay cohen
thank you for your quick response
its kinda working,
after changing the address i'm getting this error and kea stops sending responses.

DHCP4_PACKET_SEND_FAIL [hwtype=1 00:0c:29:45:76:07], cid=[01:00:0c:29:45:76:07], tid=0xdbed5a23: failed to send DHCPv4 packet: pkt4 send failed: sendmsg() returned  with an error: Invalid argument


thank you
itay,



On Mon, Sep 11, 2017 at 9:24 AM, Francis Dupont <[hidden email]> wrote:
> does some now know how to change the source ip of dhcp messages with a hook
> ?

=> setRemoteAddr(newaddr) on the received packet should do this...

Regards

Francis Dupont <[hidden email]>


_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] kea source ip

Francis Dupont
itay cohen writes:
> its kinda working,
> after changing the address i'm getting this error and kea stops sending
> responses.
>
> DHCP4_PACKET_SEND_FAIL [hwtype=1 00:0c:29:45:76:07],
> cid=[01:00:0c:29:45:76:07], tid=0xdbed5a23: failed to send DHCPv4 packet:
> pkt4 send failed: sendmsg() returned  with an error: Invalid argument

=> the kernel did not like the new address. If the problem is not
obvious strace (Linux), ktrace (BSDs) or truss (systen V) can help you
as they trace system calls including arguments (easier than debugging
via gdb/lldb/..).

Regards

[hidden email]
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users