Re: dhcrelay(8): clean up function prototypes

2016-12-08 Thread Jeremie Courreges-Anglas
Rafael Zalamena writes: > On Thu, Dec 08, 2016 at 06:59:18PM +0100, Jeremie Courreges-Anglas wrote: >> Rafael Zalamena writes: >> >> [...] >> >> >> Another problem: the relay->server code uses send(2) on a connected >> >> socket and thus has no destination IP issue. But the relay->client path

Re: dhcrelay(8): clean up function prototypes

2016-12-08 Thread Rafael Zalamena
On Thu, Dec 08, 2016 at 06:59:18PM +0100, Jeremie Courreges-Anglas wrote: > Rafael Zalamena writes: > > [...] > > >> Another problem: the relay->server code uses send(2) on a connected > >> socket and thus has no destination IP issue. But the relay->client path > >> now uses the source address

Re: dhcrelay(8): clean up function prototypes

2016-12-08 Thread Jeremie Courreges-Anglas
Rafael Zalamena writes: [...] >> Another problem: the relay->server code uses send(2) on a connected >> socket and thus has no destination IP issue. But the relay->client path >> now uses the source address from the server->relay packet. I think >> we should keep using interfaces->primary_addr

Re: dhcrelay(8): clean up function prototypes

2016-12-08 Thread Rafael Zalamena
On Thu, Dec 08, 2016 at 05:07:41PM +0100, Jeremie Courreges-Anglas wrote: > ---sniped--- > I think you've summoned Cthulhu with this diff. :) > > I started noticing a wrong behavior with when testing a multi-relay > setup, as prompted by Patrick's diff. See > > marc.info/?l=openbsd-tech&m=14809

Re: dhcrelay(8): clean up function prototypes

2016-12-08 Thread Jeremie Courreges-Anglas
Rafael Zalamena writes: > On Wed, Dec 07, 2016 at 09:36:24PM +0100, Jeremie Courreges-Anglas wrote: >> Rafael Zalamena writes: >> >> > I'm implementing some features for dhcrelay and to make them fit I need >> > some clean ups in the dhcrelay(8) first. This diff changes most of the >> > input/o

Re: dhcrelay(8): clean up function prototypes

2016-12-08 Thread Rafael Zalamena
On Wed, Dec 07, 2016 at 09:36:24PM +0100, Jeremie Courreges-Anglas wrote: > Rafael Zalamena writes: > > > I'm implementing some features for dhcrelay and to make them fit I need > > some clean ups in the dhcrelay(8) first. This diff changes most of the > > input/output functions prototypes to tak

Re: dhcrelay(8): clean up function prototypes

2016-12-07 Thread Jeremie Courreges-Anglas
Rafael Zalamena writes: > I'm implementing some features for dhcrelay and to make them fit I need > some clean ups in the dhcrelay(8) first. This diff changes most of the > input/output functions prototypes to take one parameter with all addresses > instead of passing multiple parameters. > > Bas

Re: dhcrelay(8): clean up function prototypes

2016-12-07 Thread Rafael Zalamena
On Wed, Dec 07, 2016 at 02:49:55PM +0100, Rafael Zalamena wrote: > ---snipped--- > Actually the code below is not wrong, there are some scenarios where you need this to make relayed DHCP to work. I'm not touching the part I noted before. The diff that I sent before still stands and has nothing t

dhcrelay(8): clean up function prototypes

2016-12-07 Thread Rafael Zalamena
I'm implementing some features for dhcrelay and to make them fit I need some clean ups in the dhcrelay(8) first. This diff changes most of the input/output functions prototypes to take one parameter with all addresses instead of passing multiple parameters. Basically this will make input functions