Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
On Saturday 02 June 2018 16:25:51 Pali Rohár wrote: > On Saturday 02 June 2018 15:48:58 Pali Rohár wrote: > > On Tuesday 23 May 2017 09:39:11 Pali Rohár wrote: > > > On Monday 22 May 2017 23:11:02 Simon Kelley wrote: > > > > On 12/05/17 16:32, Pali Rohár wrote: > > > > > On Friday 12 May 2017 17:15:20 Simon Kelley wrote: > > > > >> There are so many layers of quotes here that I've completely lost > > > > >> track of what we were trying to achieve, and how to achieve it. My > > > > >> memory is that we'd failed to come up with any consensus on either > > > > >> of those. > > > > > > > > > > Goal 1: > > > > > > > > > > Ability to assign one IPv4 address to two different MAC addresses. > > > > > Currently it is possible by misusing concept of "more mac addresses" > > > > > (where IPv4 address can be "steal" by later DHCP client). > > > > > > > > > > Goal 2: > > > > > > > > > > Achieve Goal 1 also for DHCPv6. > > > > > > > > > >> Using MAC addresses with DHCPv6 AT ALL is quite difficult - it's not > > > > >> a concept that the RFCs deal with. > > > > > > > > > > I read DHCPv6 RFC and it does not refuse assigning IPv6 address based > > > > > on > > > > > link layer MAC address. Anyway, this is already supported by dnsmasq. > > > > > > > > > > But what I want to achieve has ability to assign one IPv6 address to > > > > > more MAC addresses at same time. This DHCPv6 RFC does not allow, but > > > > > in > > > > > some situations it is useful and I think such options could be > > > > > provided > > > > > by DHCPv6 server with explicit warning in documentation. > > > > > > > > > >> Doing the sleight-of-hand trick > > > > >> that works with DHCPv4 doesn't seem feasible to me for DHCPv6. > > > > > > > > > > Do you completely disagree with fact that dnsmasq could support this > > > > > scenario for assigning one IP address to more network cards > > > > > (identified > > > > > by MAC address)? Or you just do not like my current implementation? > > > > > > > > The whole point of DHCP is to avoid an IP address being used by more > > > > than one network card. The current two-MAC addresses for one IP facility > > > > in DHCPv4 doesn't contradict this. It's specified to be used only when > > > > there's a guarantee that both MAC address are never simultaneously in > > > > use. > > > > > > I know. But as I wrote, lot of people misuse this feature to assign one > > > IPv4 address to more network cards. As there is use case for such state > > > and dnsmasq can do it. > > > > > > So instead of misusing that feature I'm asking how to implement it > > > properly. > > > > Hi Simon! > > > > Do you have any opinion about this? Or do you fully disagree and such > > feature should not be in dnsmasq? > > > > > > Cheers, > > > > > > > > Simon. > > > > > > > > > > > > > > > > > > In previous email I wrote that Goal 2 can be achieved by storing > > > > > tuple > > > > > DUID, IAID, MAC address and IPv6 address into DHCPv6 leases file. > > > > > > > > > > > > In IPv6 it is a more complicated, e.g. when network administrator wants > > to assign one IPv6 address for specific computer. > > > > Imagine that you have one computer with more OS (dua-boot) and each OS > > has its own DUID and IAID (MAC address is stable). > > > > Problem: dnsmasq assign IPv6 address to that computer when OS1 is > > running. Computer is then rebooted to OS2 which has different DUID and > > IAID. Therefore dnsmasq assigns a new (different) IPv6, because old one > > is still "used" in server lease file. > > > > To "solve" this problem it is either needed to extend dnsmasq to allow > > assigning one IPv6 address to more DUIDs/IAIDs. > > > > Or to assign IPv6 addresses based on MAC address and then dnsmasq leases > > file needs to be extended to included also MAC address for IPv6 > > addresses. > > Currently in lease file for DHCPv6 records there is line: > > expire_time iaid ipv6_addr hostname duid > > and for DHCPv4 is: > > expire_time mac ipv4_addr hostname clid > > To have similar format DHCPv6 records as DHCPv4 could be changed and > extended for mac address to: > > expire_time mac ipv6_addr hostname duid iaid > > Or to have iaid on same position, to: > > expire_time iaid ipv6_addr hostname duid mac > > And then allow assigning IPv6 address for IAID and correctly from lease > file for IPv6 address takes value relevant for configuration. E.g. when > IPv6 address is assigned based on MAC address, took mac. When is > assigned for DUID, then duid. And when iaid, then IAID. > > So when configured this would allow "stealing" IPv6 address when there > is one computer which uses two different DHPv6 clients with different > DUIDs or IAIDs. (E.g. dual-boot Linux-Windows setup). > > > Also this extended information in lease file could allow to implement > that assigning one IPv6 address to more MAC addresses properly as in > lease file would be all relevant information about dhcp client. Hi Simon! Have you looked
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
On Tuesday 23 May 2017 09:39:11 Pali Rohár wrote: > On Monday 22 May 2017 23:11:02 Simon Kelley wrote: > > On 12/05/17 16:32, Pali Rohár wrote: > > > On Friday 12 May 2017 17:15:20 Simon Kelley wrote: > > >> There are so many layers of quotes here that I've completely lost > > >> track of what we were trying to achieve, and how to achieve it. My > > >> memory is that we'd failed to come up with any consensus on either > > >> of those. > > > > > > Goal 1: > > > > > > Ability to assign one IPv4 address to two different MAC addresses. > > > Currently it is possible by misusing concept of "more mac addresses" > > > (where IPv4 address can be "steal" by later DHCP client). > > > > > > Goal 2: > > > > > > Achieve Goal 1 also for DHCPv6. > > > > > >> Using MAC addresses with DHCPv6 AT ALL is quite difficult - it's not > > >> a concept that the RFCs deal with. > > > > > > I read DHCPv6 RFC and it does not refuse assigning IPv6 address based on > > > link layer MAC address. Anyway, this is already supported by dnsmasq. > > > > > > But what I want to achieve has ability to assign one IPv6 address to > > > more MAC addresses at same time. This DHCPv6 RFC does not allow, but in > > > some situations it is useful and I think such options could be provided > > > by DHCPv6 server with explicit warning in documentation. > > > > > >> Doing the sleight-of-hand trick > > >> that works with DHCPv4 doesn't seem feasible to me for DHCPv6. > > > > > > Do you completely disagree with fact that dnsmasq could support this > > > scenario for assigning one IP address to more network cards (identified > > > by MAC address)? Or you just do not like my current implementation? > > > > The whole point of DHCP is to avoid an IP address being used by more > > than one network card. The current two-MAC addresses for one IP facility > > in DHCPv4 doesn't contradict this. It's specified to be used only when > > there's a guarantee that both MAC address are never simultaneously in use. > > I know. But as I wrote, lot of people misuse this feature to assign one > IPv4 address to more network cards. As there is use case for such state > and dnsmasq can do it. > > So instead of misusing that feature I'm asking how to implement it > properly. Hi Simon! Do you have any opinion about this? Or do you fully disagree and such feature should not be in dnsmasq? > > Cheers, > > > > Simon. > > > > > > > > > > In previous email I wrote that Goal 2 can be achieved by storing tuple > > > DUID, IAID, MAC address and IPv6 address into DHCPv6 leases file. > > > > In IPv6 it is a more complicated, e.g. when network administrator wants to assign one IPv6 address for specific computer. Imagine that you have one computer with more OS (dua-boot) and each OS has its own DUID and IAID (MAC address is stable). Problem: dnsmasq assign IPv6 address to that computer when OS1 is running. Computer is then rebooted to OS2 which has different DUID and IAID. Therefore dnsmasq assigns a new (different) IPv6, because old one is still "used" in server lease file. To "solve" this problem it is either needed to extend dnsmasq to allow assigning one IPv6 address to more DUIDs/IAIDs. Or to assign IPv6 addresses based on MAC address and then dnsmasq leases file needs to be extended to included also MAC address for IPv6 addresses. -- Pali Rohár pali.ro...@gmail.com signature.asc Description: PGP signature ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
On Saturday 02 June 2018 15:48:58 Pali Rohár wrote: > On Tuesday 23 May 2017 09:39:11 Pali Rohár wrote: > > On Monday 22 May 2017 23:11:02 Simon Kelley wrote: > > > On 12/05/17 16:32, Pali Rohár wrote: > > > > On Friday 12 May 2017 17:15:20 Simon Kelley wrote: > > > >> There are so many layers of quotes here that I've completely lost > > > >> track of what we were trying to achieve, and how to achieve it. My > > > >> memory is that we'd failed to come up with any consensus on either > > > >> of those. > > > > > > > > Goal 1: > > > > > > > > Ability to assign one IPv4 address to two different MAC addresses. > > > > Currently it is possible by misusing concept of "more mac addresses" > > > > (where IPv4 address can be "steal" by later DHCP client). > > > > > > > > Goal 2: > > > > > > > > Achieve Goal 1 also for DHCPv6. > > > > > > > >> Using MAC addresses with DHCPv6 AT ALL is quite difficult - it's not > > > >> a concept that the RFCs deal with. > > > > > > > > I read DHCPv6 RFC and it does not refuse assigning IPv6 address based > > > > on > > > > link layer MAC address. Anyway, this is already supported by dnsmasq. > > > > > > > > But what I want to achieve has ability to assign one IPv6 address to > > > > more MAC addresses at same time. This DHCPv6 RFC does not allow, but in > > > > some situations it is useful and I think such options could be provided > > > > by DHCPv6 server with explicit warning in documentation. > > > > > > > >> Doing the sleight-of-hand trick > > > >> that works with DHCPv4 doesn't seem feasible to me for DHCPv6. > > > > > > > > Do you completely disagree with fact that dnsmasq could support this > > > > scenario for assigning one IP address to more network cards (identified > > > > by MAC address)? Or you just do not like my current implementation? > > > > > > The whole point of DHCP is to avoid an IP address being used by more > > > than one network card. The current two-MAC addresses for one IP facility > > > in DHCPv4 doesn't contradict this. It's specified to be used only when > > > there's a guarantee that both MAC address are never simultaneously in use. > > > > I know. But as I wrote, lot of people misuse this feature to assign one > > IPv4 address to more network cards. As there is use case for such state > > and dnsmasq can do it. > > > > So instead of misusing that feature I'm asking how to implement it > > properly. > > Hi Simon! > > Do you have any opinion about this? Or do you fully disagree and such > feature should not be in dnsmasq? > > > > Cheers, > > > > > > Simon. > > > > > > > > > > > > > > In previous email I wrote that Goal 2 can be achieved by storing tuple > > > > DUID, IAID, MAC address and IPv6 address into DHCPv6 leases file. > > > > > > > > In IPv6 it is a more complicated, e.g. when network administrator wants > to assign one IPv6 address for specific computer. > > Imagine that you have one computer with more OS (dua-boot) and each OS > has its own DUID and IAID (MAC address is stable). > > Problem: dnsmasq assign IPv6 address to that computer when OS1 is > running. Computer is then rebooted to OS2 which has different DUID and > IAID. Therefore dnsmasq assigns a new (different) IPv6, because old one > is still "used" in server lease file. > > To "solve" this problem it is either needed to extend dnsmasq to allow > assigning one IPv6 address to more DUIDs/IAIDs. > > Or to assign IPv6 addresses based on MAC address and then dnsmasq leases > file needs to be extended to included also MAC address for IPv6 > addresses. Currently in lease file for DHCPv6 records there is line: expire_time iaid ipv6_addr hostname duid and for DHCPv4 is: expire_time mac ipv4_addr hostname clid To have similar format DHCPv6 records as DHCPv4 could be changed and extended for mac address to: expire_time mac ipv6_addr hostname duid iaid Or to have iaid on same position, to: expire_time iaid ipv6_addr hostname duid mac And then allow assigning IPv6 address for IAID and correctly from lease file for IPv6 address takes value relevant for configuration. E.g. when IPv6 address is assigned based on MAC address, took mac. When is assigned for DUID, then duid. And when iaid, then IAID. So when configured this would allow "stealing" IPv6 address when there is one computer which uses two different DHPv6 clients with different DUIDs or IAIDs. (E.g. dual-boot Linux-Windows setup). Also this extended information in lease file could allow to implement that assigning one IPv6 address to more MAC addresses properly as in lease file would be all relevant information about dhcp client. -- Pali Rohár pali.ro...@gmail.com signature.asc Description: PGP signature ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
On Monday 22 May 2017 23:11:02 Simon Kelley wrote: > On 12/05/17 16:32, Pali Rohár wrote: > > On Friday 12 May 2017 17:15:20 Simon Kelley wrote: > >> There are so many layers of quotes here that I've completely lost > >> track of what we were trying to achieve, and how to achieve it. My > >> memory is that we'd failed to come up with any consensus on either > >> of those. > > > > Goal 1: > > > > Ability to assign one IPv4 address to two different MAC addresses. > > Currently it is possible by misusing concept of "more mac addresses" > > (where IPv4 address can be "steal" by later DHCP client). > > > > Goal 2: > > > > Achieve Goal 1 also for DHCPv6. > > > >> Using MAC addresses with DHCPv6 AT ALL is quite difficult - it's not > >> a concept that the RFCs deal with. > > > > I read DHCPv6 RFC and it does not refuse assigning IPv6 address based on > > link layer MAC address. Anyway, this is already supported by dnsmasq. > > > > But what I want to achieve has ability to assign one IPv6 address to > > more MAC addresses at same time. This DHCPv6 RFC does not allow, but in > > some situations it is useful and I think such options could be provided > > by DHCPv6 server with explicit warning in documentation. > > > >> Doing the sleight-of-hand trick > >> that works with DHCPv4 doesn't seem feasible to me for DHCPv6. > > > > Do you completely disagree with fact that dnsmasq could support this > > scenario for assigning one IP address to more network cards (identified > > by MAC address)? Or you just do not like my current implementation? > > The whole point of DHCP is to avoid an IP address being used by more > than one network card. The current two-MAC addresses for one IP facility > in DHCPv4 doesn't contradict this. It's specified to be used only when > there's a guarantee that both MAC address are never simultaneously in use. I know. But as I wrote, lot of people misuse this feature to assign one IPv4 address to more network cards. As there is use case for such state and dnsmasq can do it. So instead of misusing that feature I'm asking how to implement it properly. > Cheers, > > Simon. > > > > > > In previous email I wrote that Goal 2 can be achieved by storing tuple > > DUID, IAID, MAC address and IPv6 address into DHCPv6 leases file. > > -- Pali Rohár pali.ro...@gmail.com ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
On 12/05/17 16:32, Pali Rohár wrote: > On Friday 12 May 2017 17:15:20 Simon Kelley wrote: >> There are so many layers of quotes here that I've completely lost >> track of what we were trying to achieve, and how to achieve it. My >> memory is that we'd failed to come up with any consensus on either >> of those. > > Goal 1: > > Ability to assign one IPv4 address to two different MAC addresses. > Currently it is possible by misusing concept of "more mac addresses" > (where IPv4 address can be "steal" by later DHCP client). > > Goal 2: > > Achieve Goal 1 also for DHCPv6. > >> Using MAC addresses with DHCPv6 AT ALL is quite difficult - it's not >> a concept that the RFCs deal with. > > I read DHCPv6 RFC and it does not refuse assigning IPv6 address based on > link layer MAC address. Anyway, this is already supported by dnsmasq. > > But what I want to achieve has ability to assign one IPv6 address to > more MAC addresses at same time. This DHCPv6 RFC does not allow, but in > some situations it is useful and I think such options could be provided > by DHCPv6 server with explicit warning in documentation. > >> Doing the sleight-of-hand trick >> that works with DHCPv4 doesn't seem feasible to me for DHCPv6. > > Do you completely disagree with fact that dnsmasq could support this > scenario for assigning one IP address to more network cards (identified > by MAC address)? Or you just do not like my current implementation? The whole point of DHCP is to avoid an IP address being used by more than one network card. The current two-MAC addresses for one IP facility in DHCPv4 doesn't contradict this. It's specified to be used only when there's a guarantee that both MAC address are never simultaneously in use. Cheers, Simon. > > In previous email I wrote that Goal 2 can be achieved by storing tuple > DUID, IAID, MAC address and IPv6 address into DHCPv6 leases file. > signature.asc Description: OpenPGP digital signature ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
On Friday 12 May 2017 17:15:20 Simon Kelley wrote: > There are so many layers of quotes here that I've completely lost > track of what we were trying to achieve, and how to achieve it. My > memory is that we'd failed to come up with any consensus on either > of those. Goal 1: Ability to assign one IPv4 address to two different MAC addresses. Currently it is possible by misusing concept of "more mac addresses" (where IPv4 address can be "steal" by later DHCP client). Goal 2: Achieve Goal 1 also for DHCPv6. > Using MAC addresses with DHCPv6 AT ALL is quite difficult - it's not > a concept that the RFCs deal with. I read DHCPv6 RFC and it does not refuse assigning IPv6 address based on link layer MAC address. Anyway, this is already supported by dnsmasq. But what I want to achieve has ability to assign one IPv6 address to more MAC addresses at same time. This DHCPv6 RFC does not allow, but in some situations it is useful and I think such options could be provided by DHCPv6 server with explicit warning in documentation. > Doing the sleight-of-hand trick > that works with DHCPv4 doesn't seem feasible to me for DHCPv6. Do you completely disagree with fact that dnsmasq could support this scenario for assigning one IP address to more network cards (identified by MAC address)? Or you just do not like my current implementation? In previous email I wrote that Goal 2 can be achieved by storing tuple DUID, IAID, MAC address and IPv6 address into DHCPv6 leases file. -- Pali Rohár pali.ro...@gmail.com signature.asc Description: This is a digitally signed message part. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
On 09/05/17 10:21, Pali Rohár wrote: > On Sunday 02 October 2016 11:43:43 Pali Rohár wrote: >> On Wednesday 27 January 2016 13:37:27 Pali Rohár wrote: >>> On Wednesday 20 January 2016 20:15:23 Simon Kelley wrote: Dnsmasq identifies IPv6 clients via their MAC address for the purpose of selecting dhcp-host configuration to use, but it doesn't use the MAC address as a unique client identifier for the purpose of assigning DHCP leases in the same way the DHCPv4 does. That's the crucial difference. >>> >>> Yes, I know. >>> The equivalent of the DHCPv4 share MAC address facility, should really be something which shares IAIDs, maybe? >>> >>> Right, in lease file is stored pair (MAC address, IP address) for >>> IPv4 and pair (IAID, IPv6 address) for IPv6. >>> The crucial thing I'm trying to achieve here is turning your patch from something that works on your network, with your very odd configuration, into something that other people might want and use. Without that, it's fine as your patch, but it can't go into the dnsmasq mainline. >>> >>> Understood. >>> Maybe the way to think about that is to think about how to document it. If we can describe what problem it solves, and how it should be used, then we'll be getting there. >>> >>> I was thinking about it for more days. It is really not easy to solve >>> this problem... Here are my results: >>> >>> * There are people who misuse original concept of "more mac >>> addresses" for one ipv4 address. Dnsmasq supports this configuration >>> only if one mac address from that --dhcp-host line is used at same >>> time. >>> >>> * DHCPv6 clients are identified by DUID string, which we can say is >>> totally random and are not persistent across multi-OS computers or >>> reinstalling... >>> >>> * Internally DHCPv6 leases are identified by IAID. >>> >>> So to make configuration clean for both IPv4 and IPv6 we need support >>> for: >>> >>> * Assigning IPv4 lease to more MAC addresses at the same time >>> (This will help people to use "more mac addresses" functionality >>> correctly) >>> >>> * Assigning IPv6 address to more DUIDs at the same time >>> (This is "correct" IPv6 equivalent for previous request) >>> >>> * Assigning IPv6 address to more MAC addresses at the same time >>> (This is what would fix DUID problem) >>> >>> And it means that pair (IAID, IPv6 address) for IPv6 leases it not >>> enough to do it. >>> >>> So, what about extending lease line for IPv6 addresses to include >>> DUID and MAC address? >>> We need to bear in mind that the behaviour we're talking about violates the RFCs specifying DHCPv6, so it has to be especially carefull justified. >>> >>> Thats probably truth, but if something is useful users will try to >>> use it. Either itself by patching dnsmasq or if possible by optional >>> config options... >> >> Hi Simon! Replaying to my old email from January. Have you found some >> time to look at my suggestions? If yes, what do you think about it? >> > > PING again. > There are so many layers of quotes here that I've completely lost track of what we were trying to achieve, and how to achieve it. My memory is that we'd failed to come up with any consensus on either of those. Using MAC addresses with DHCPv6 AT ALL is quite difficult - it's not a concept that the RFCs deal with. Doing the sleight-of-hand trick that works with DHCPv4 doesn't seem feasible to me for DHCPv6. Cheers, Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
On Sunday 02 October 2016 11:43:43 Pali Rohár wrote: > On Wednesday 27 January 2016 13:37:27 Pali Rohár wrote: > > On Wednesday 20 January 2016 20:15:23 Simon Kelley wrote: > > > Dnsmasq identifies IPv6 clients via their MAC address for the > > > purpose of selecting dhcp-host configuration to use, but it > > > doesn't use the MAC address as a unique client identifier for the > > > purpose of assigning DHCP leases in the same way the DHCPv4 does. > > > That's the crucial difference. > > > > Yes, I know. > > > > > The equivalent of the DHCPv4 share MAC address facility, should > > > really be something which shares IAIDs, maybe? > > > > Right, in lease file is stored pair (MAC address, IP address) for > > IPv4 and pair (IAID, IPv6 address) for IPv6. > > > > > The crucial thing I'm trying to achieve here is turning your patch > > > from something that works on your network, with your very odd > > > configuration, into something that other people might want and use. > > > Without that, it's fine as your patch, but it can't go into the > > > dnsmasq mainline. > > > > Understood. > > > > > Maybe the way to think about that is to think about > > > how to document it. If we can describe what problem it solves, and > > > how it should be used, then we'll be getting there. > > > > I was thinking about it for more days. It is really not easy to solve > > this problem... Here are my results: > > > > * There are people who misuse original concept of "more mac > > addresses" for one ipv4 address. Dnsmasq supports this configuration > > only if one mac address from that --dhcp-host line is used at same > > time. > > > > * DHCPv6 clients are identified by DUID string, which we can say is > > totally random and are not persistent across multi-OS computers or > > reinstalling... > > > > * Internally DHCPv6 leases are identified by IAID. > > > > So to make configuration clean for both IPv4 and IPv6 we need support > > for: > > > > * Assigning IPv4 lease to more MAC addresses at the same time > > (This will help people to use "more mac addresses" functionality > > correctly) > > > > * Assigning IPv6 address to more DUIDs at the same time > > (This is "correct" IPv6 equivalent for previous request) > > > > * Assigning IPv6 address to more MAC addresses at the same time > > (This is what would fix DUID problem) > > > > And it means that pair (IAID, IPv6 address) for IPv6 leases it not > > enough to do it. > > > > So, what about extending lease line for IPv6 addresses to include > > DUID and MAC address? > > > > > We need to bear in > > > mind that the behaviour we're talking about violates the RFCs > > > specifying DHCPv6, so it has to be especially carefull justified. > > > > Thats probably truth, but if something is useful users will try to > > use it. Either itself by patching dnsmasq or if possible by optional > > config options... > > Hi Simon! Replaying to my old email from January. Have you found some > time to look at my suggestions? If yes, what do you think about it? > PING again. -- Pali Rohár pali.ro...@gmail.com ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
On Wednesday 27 January 2016 13:37:27 Pali Rohár wrote: > On Wednesday 20 January 2016 20:15:23 Simon Kelley wrote: > > Dnsmasq identifies IPv6 clients via their MAC address for the > > purpose of selecting dhcp-host configuration to use, but it > > doesn't use the MAC address as a unique client identifier for the > > purpose of assigning DHCP leases in the same way the DHCPv4 does. > > That's the crucial difference. > > Yes, I know. > > > The equivalent of the DHCPv4 share MAC address facility, should > > really be something which shares IAIDs, maybe? > > Right, in lease file is stored pair (MAC address, IP address) for > IPv4 and pair (IAID, IPv6 address) for IPv6. > > > The crucial thing I'm trying to achieve here is turning your patch > > from something that works on your network, with your very odd > > configuration, into something that other people might want and use. > > Without that, it's fine as your patch, but it can't go into the > > dnsmasq mainline. > > Understood. > > > Maybe the way to think about that is to think about > > how to document it. If we can describe what problem it solves, and > > how it should be used, then we'll be getting there. > > I was thinking about it for more days. It is really not easy to solve > this problem... Here are my results: > > * There are people who misuse original concept of "more mac > addresses" for one ipv4 address. Dnsmasq supports this configuration > only if one mac address from that --dhcp-host line is used at same > time. > > * DHCPv6 clients are identified by DUID string, which we can say is > totally random and are not persistent across multi-OS computers or > reinstalling... > > * Internally DHCPv6 leases are identified by IAID. > > So to make configuration clean for both IPv4 and IPv6 we need support > for: > > * Assigning IPv4 lease to more MAC addresses at the same time > (This will help people to use "more mac addresses" functionality > correctly) > > * Assigning IPv6 address to more DUIDs at the same time > (This is "correct" IPv6 equivalent for previous request) > > * Assigning IPv6 address to more MAC addresses at the same time > (This is what would fix DUID problem) > > And it means that pair (IAID, IPv6 address) for IPv6 leases it not > enough to do it. > > So, what about extending lease line for IPv6 addresses to include > DUID and MAC address? > > > We need to bear in > > mind that the behaviour we're talking about violates the RFCs > > specifying DHCPv6, so it has to be especially carefull justified. > > Thats probably truth, but if something is useful users will try to > use it. Either itself by patching dnsmasq or if possible by optional > config options... Hi Simon! Replaying to my old email from January. Have you found some time to look at my suggestions? If yes, what do you think about it? -- Pali Rohár pali.ro...@gmail.com signature.asc Description: This is a digitally signed message part. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
(after two months) PING! On Wednesday 27 January 2016 13:37:27 Pali Rohár wrote: > On Wednesday 20 January 2016 20:15:23 Simon Kelley wrote: > > Dnsmasq identifies IPv6 clients via their MAC address for the purpose > > of selecting dhcp-host configuration to use, but it doesn't use the > > MAC address as a unique client identifier for the purpose of assigning > > DHCP leases in the same way the DHCPv4 does. That's the crucial > > difference. > > Yes, I know. > > > The equivalent of the DHCPv4 share MAC address facility, should really > > be something which shares IAIDs, maybe? > > Right, in lease file is stored pair (MAC address, IP address) for IPv4 > and pair (IAID, IPv6 address) for IPv6. > > > The crucial thing I'm trying to achieve here is turning your patch > > from something that works on your network, with your very odd > > configuration, into something that other people might want and use. > > Without that, it's fine as your patch, but it can't go into the > > dnsmasq mainline. > > Understood. > > > Maybe the way to think about that is to think about > > how to document it. If we can describe what problem it solves, and how > > it should be used, then we'll be getting there. > > I was thinking about it for more days. It is really not easy to solve > this problem... Here are my results: > > * There are people who misuse original concept of "more mac addresses" > for one ipv4 address. Dnsmasq supports this configuration only if one > mac address from that --dhcp-host line is used at same time. > > * DHCPv6 clients are identified by DUID string, which we can say is > totally random and are not persistent across multi-OS computers or > reinstalling... > > * Internally DHCPv6 leases are identified by IAID. > > So to make configuration clean for both IPv4 and IPv6 we need support for: > > * Assigning IPv4 lease to more MAC addresses at the same time > (This will help people to use "more mac addresses" functionality correctly) > > * Assigning IPv6 address to more DUIDs at the same time > (This is "correct" IPv6 equivalent for previous request) > > * Assigning IPv6 address to more MAC addresses at the same time > (This is what would fix DUID problem) > > And it means that pair (IAID, IPv6 address) for IPv6 leases it not > enough to do it. > > So, what about extending lease line for IPv6 addresses to include DUID > and MAC address? > > > We need to bear in > > mind that the behaviour we're talking about violates the RFCs > > specifying DHCPv6, so it has to be especially carefull justified. > > Thats probably truth, but if something is useful users will try to use > it. Either itself by patching dnsmasq or if possible by optional config > options... > -- Pali Rohár pali.ro...@gmail.com ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
On Wednesday 20 January 2016 20:15:23 Simon Kelley wrote: > Dnsmasq identifies IPv6 clients via their MAC address for the purpose > of selecting dhcp-host configuration to use, but it doesn't use the > MAC address as a unique client identifier for the purpose of assigning > DHCP leases in the same way the DHCPv4 does. That's the crucial > difference. Yes, I know. > The equivalent of the DHCPv4 share MAC address facility, should really > be something which shares IAIDs, maybe? Right, in lease file is stored pair (MAC address, IP address) for IPv4 and pair (IAID, IPv6 address) for IPv6. > The crucial thing I'm trying to achieve here is turning your patch > from something that works on your network, with your very odd > configuration, into something that other people might want and use. > Without that, it's fine as your patch, but it can't go into the > dnsmasq mainline. Understood. > Maybe the way to think about that is to think about > how to document it. If we can describe what problem it solves, and how > it should be used, then we'll be getting there. I was thinking about it for more days. It is really not easy to solve this problem... Here are my results: * There are people who misuse original concept of "more mac addresses" for one ipv4 address. Dnsmasq supports this configuration only if one mac address from that --dhcp-host line is used at same time. * DHCPv6 clients are identified by DUID string, which we can say is totally random and are not persistent across multi-OS computers or reinstalling... * Internally DHCPv6 leases are identified by IAID. So to make configuration clean for both IPv4 and IPv6 we need support for: * Assigning IPv4 lease to more MAC addresses at the same time (This will help people to use "more mac addresses" functionality correctly) * Assigning IPv6 address to more DUIDs at the same time (This is "correct" IPv6 equivalent for previous request) * Assigning IPv6 address to more MAC addresses at the same time (This is what would fix DUID problem) And it means that pair (IAID, IPv6 address) for IPv6 leases it not enough to do it. So, what about extending lease line for IPv6 addresses to include DUID and MAC address? > We need to bear in > mind that the behaviour we're talking about violates the RFCs > specifying DHCPv6, so it has to be especially carefull justified. Thats probably truth, but if something is useful users will try to use it. Either itself by patching dnsmasq or if possible by optional config options... -- Pali Rohár pali.ro...@gmail.com ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 16/01/16 15:00, Pali Rohár wrote: > On Friday 15 January 2016 22:48:31 Simon Kelley wrote: >> On 01/01/16 21:29, Pali Rohár wrote: >>> On Friday 01 January 2016 21:23:36 Simon Kelley wrote: On 23/12/15 21:10, Pali Rohár wrote: > This patch allows to assign one IPv6 address for more > config entries specified by MAC address. This is similar > function as for IPv4 addresses in DHCPv4 server code part. This needs some thinking about: DHCPv6 is different from DHCPv4 in that clients are not, at all, identified by MAC address, rather by client-id and IAID. >>> >>> I know and this is absolutely uncomfortable for me. One client >>> has >>> >>> different DUID across different operating systems. Also >>> different >>> >>> across OS reinstalling... Also if I want to connect new device >>> I need to instruct people how to set stable DUID across all >>> OS... Just not usable for normal usage of "any" device. >>> >>> For identifying computer/device I need some stable identifier >>> and DHCPv6 DUID is *not* stable in current implementation of >>> major usage OS. >>> >>> MAC address of network card is stable. And so this identifier >>> is what I prefer to use. dnsmasq has for it support and I'm >>> happy for it! And when I configure both DHCPv4 and DHCPv6 one >>> configuration line MAC,ipv4,ipv6 is really nice for having >>> "clean" configuration. >>> In addition, DHCPv6 handles multiple addresses and leases per client. >>> >>> When using just DUID I have problem here. My laptop has both >>> Wifi and wired ethernet and with DUID information I'm not able >>> to configure dnsmasq for stable ipv6 addresses. >>> What's important? To be able to specify more than on MAC address, any one of which can be matched, or to have a single IPv6 address which is removed from one IAID to another if the MAC addresses are paired? >>> >>> For specified laptops, I have special configuration. All >>> network interfaces (one wifi, one wired ethernet) on those >>> laptops is assigned same IP address. Operating system is >>> configured in special way that when both interfaces are active >>> it send packets *only* via ethernet. >>> >>> So it allows me to have active TCP connections and allows me >>> to switch between wifi/ethernet without dropping it. >>> >>> DHCPv4 in dnsmasq has already support for assigning one ip >>> address to more MAC addresses (more clients) and this my patch >>> add support for it too. >> >> That makes sense. I think if you can organise for both interfaces >> to send the same CLID and IAID, then both will get the same >> address. > > I cannot do that. It is limitation of ISC dhclient which I'm using. > Already tried to do that, not possible. > >> Actually, one way to make this work may be to have ONE DHCP >> client, and make it configure both interfaces, or copy the >> address from one interface to the other. > > For classic "desktop" linux solution it is again not possible. > Whole network configuration is done by NetworkManager which just do > not support something like this... > >> I think you can configure a stable address not matter which >> interface actually does the DHCP transaction with >> >> dhcp-host= dhcp-host= >> >> without needing any patches to the code. > > If IP-address from first line is same as from second line, then > dnsmasq refuse to assign same address to both mac1 and mac2 > addresses. Already tried that. Even if the DHCP client provides the same CLID and IAID? Later: OK, I saw that you can't do that. > >> The way you're using the IPv4 multiple mac address feature is >> interesting, It was intended to work when only one interface is >> active at any time. > > I know but, if you start thinking how "stealing" that lease work > when both interfaces are active, then is no reason why it should > not work (in case you have correct working DHCPv4 client). > > Anyway I know lot of people who use this "multiple mac address > feature". So it is really useful feature. > >> Extending this to DHCPv6 doesn't really work, because DHCPv6 >> doesn't use the MAC address to identify interfaces, as I said in >> my previous reply. > > But dnsmasq has already support for identifying IPv6 clients via > its mac address (in case there is no DHCPv6 relay) since commit > 89500e3. And this my patch is working fine on my network. > Dnsmasq identifies IPv6 clients via their MAC address for the purpose of selecting dhcp-host configuration to use, but it doesn't use the MAC address as a unique client identifier for the purpose of assigning DHCP leases in the same way the DHCPv4 does. That's the crucial difference. The equivalent of the DHCPv4 share MAC address facility, should really be something which shares IAIDs, maybe? The crucial thing I'm trying to achieve here is turning your patch from something that works on your network, with your very odd configuration, into something
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
On Friday 15 January 2016 22:48:31 Simon Kelley wrote: > On 01/01/16 21:29, Pali Rohár wrote: > > On Friday 01 January 2016 21:23:36 Simon Kelley wrote: > >> On 23/12/15 21:10, Pali Rohár wrote: > >>> This patch allows to assign one IPv6 address for more config > >>> entries specified by MAC address. This is similar function as > >>> for IPv4 addresses in DHCPv4 server code part. > >> > >> This needs some thinking about: DHCPv6 is different from DHCPv4 > >> in that clients are not, at all, identified by MAC address, > >> rather by client-id and IAID. > > > > I know and this is absolutely uncomfortable for me. One client has > > > > different DUID across different operating systems. Also different > > > > across OS reinstalling... Also if I want to connect new device I > > need to instruct people how to set stable DUID across all OS... > > Just not usable for normal usage of "any" device. > > > > For identifying computer/device I need some stable identifier and > > DHCPv6 DUID is *not* stable in current implementation of major > > usage OS. > > > > MAC address of network card is stable. And so this identifier is > > what I prefer to use. dnsmasq has for it support and I'm happy for > > it! And when I configure both DHCPv4 and DHCPv6 one configuration > > line MAC,ipv4,ipv6 is really nice for having "clean" > > configuration. > > > >> In addition, DHCPv6 handles multiple addresses and leases per > >> client. > > > > When using just DUID I have problem here. My laptop has both Wifi > > and wired ethernet and with DUID information I'm not able to > > configure dnsmasq for stable ipv6 addresses. > > > >> What's important? To be able to specify more than on MAC address, > >> any one of which can be matched, or to have a single IPv6 address > >> which is removed from one IAID to another if the MAC addresses > >> are paired? > > > > For specified laptops, I have special configuration. All network > > interfaces (one wifi, one wired ethernet) on those laptops is > > assigned same IP address. Operating system is configured in special > > way that when both interfaces are active it send packets *only* via > > ethernet. > > > > So it allows me to have active TCP connections and allows me to > > switch between wifi/ethernet without dropping it. > > > > DHCPv4 in dnsmasq has already support for assigning one ip address > > to more MAC addresses (more clients) and this my patch add support > > for it too. > > That makes sense. I think if you can organise for both interfaces to > send the same CLID and IAID, then both will get the same address. I cannot do that. It is limitation of ISC dhclient which I'm using. Already tried to do that, not possible. > Actually, one way to make this work may be to have ONE DHCP client, > and make it configure both interfaces, or copy the address from one > interface to the other. For classic "desktop" linux solution it is again not possible. Whole network configuration is done by NetworkManager which just do not support something like this... > I think you can configure a stable address not matter which interface > actually does the DHCP transaction with > > dhcp-host= > dhcp-host= > > without needing any patches to the code. If IP-address from first line is same as from second line, then dnsmasq refuse to assign same address to both mac1 and mac2 addresses. Already tried that. > The way you're using the IPv4 multiple mac address feature is > interesting, It was intended to work when only one interface is > active at any time. I know but, if you start thinking how "stealing" that lease work when both interfaces are active, then is no reason why it should not work (in case you have correct working DHCPv4 client). Anyway I know lot of people who use this "multiple mac address feature". So it is really useful feature. > Extending this to DHCPv6 doesn't really work, > because DHCPv6 doesn't use the MAC address to identify interfaces, > as I said in my previous reply. But dnsmasq has already support for identifying IPv6 clients via its mac address (in case there is no DHCPv6 relay) since commit 89500e3. And this my patch is working fine on my network. -- Pali Rohár pali.ro...@gmail.com signature.asc Description: This is a digitally signed message part. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 01/01/16 21:29, Pali Rohár wrote: > On Friday 01 January 2016 21:23:36 Simon Kelley wrote: >> On 23/12/15 21:10, Pali Rohár wrote: >>> This patch allows to assign one IPv6 address for more config >>> entries specified by MAC address. This is similar function as >>> for IPv4 addresses in DHCPv4 server code part. >> >> This needs some thinking about: DHCPv6 is different from DHCPv4 >> in that clients are not, at all, identified by MAC address, >> rather by client-id and IAID. > > I know and this is absolutely uncomfortable for me. One client has > different DUID across different operating systems. Also different > across OS reinstalling... Also if I want to connect new device I > need to instruct people how to set stable DUID across all OS... > Just not usable for normal usage of "any" device. > > For identifying computer/device I need some stable identifier and > DHCPv6 DUID is *not* stable in current implementation of major > usage OS. > > MAC address of network card is stable. And so this identifier is > what I prefer to use. dnsmasq has for it support and I'm happy for > it! And when I configure both DHCPv4 and DHCPv6 one configuration > line MAC,ipv4,ipv6 is really nice for having "clean" > configuration. > >> In addition, DHCPv6 handles multiple addresses and leases per >> client. > > When using just DUID I have problem here. My laptop has both Wifi > and wired ethernet and with DUID information I'm not able to > configure dnsmasq for stable ipv6 addresses. > >> What's important? To be able to specify more than on MAC address, >> any one of which can be matched, or to have a single IPv6 address >> which is removed from one IAID to another if the MAC addresses >> are paired? > > For specified laptops, I have special configuration. All network > interfaces (one wifi, one wired ethernet) on those laptops is > assigned same IP address. Operating system is configured in special > way that when both interfaces are active it send packets *only* via > ethernet. > > So it allows me to have active TCP connections and allows me to > switch between wifi/ethernet without dropping it. > > DHCPv4 in dnsmasq has already support for assigning one ip address > to more MAC addresses (more clients) and this my patch add support > for it too. > That makes sense. I think if you can organise for both interfaces to send the same CLID and IAID, then both will get the same address. Actually, one way to make this work may be to have ONE DHCP client, and make it configure both interfaces, or copy the address from one interface to the other. I think you can configure a stable address not matter which interface actually does the DHCP transaction with dhcp-host= dhcp-host= without needing any patches to the code. The way you're using the IPv4 multiple mac address feature is interesting, It was intended to work when only one interface is active at any time. Extending this to DHCPv6 doesn't really work, because DHCPv6 doesn't use the MAC address to identify interfaces, as I said in my previous reply. Cheers, Simon. -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBCAAGBQJWmWkvAAoJEBXN2mrhkTWiyFsQAJVa2PBhSelhsL9fps++FVYx PWcHJft8xgksqdUKKxkErZRqCyiTURNTJZ9SQY2uCTLlYyfsotVXW6GOTlTWeVMR EsqM5Ti7OLALhwQnBuCPAZU4P8Rws7W2XvgkKR1hHiZjedV63zQUWNw7CmCqIH+b tN3J0n0sY4o5nNxdkNUyFJI3pattTBmrZm7JEIwxR+UIn4YeoAORzPO4f51dvjbp 3JQ2AYbqwWgjuIpkB+NZX+slwuF7ljImQybMJ5Tq9R46/rG7XaIqm/goku6IHGVH mvmCCRjE+Bp1Lr8jkTqtitzbzgqjLeYH9jnGzS0LSpFSjvVU5TSdsggKaJxZAcWh unmbosL256U4Pg+piV9sF6PTddpUWni8/BUsQZbzBLcfSwZKppaOEUPaWfUNYwXH IfdRe7EQe5cLDytd9e85KGMOxh1ay+JUtXHDvyit7/nyIjr8lyoGMgjfM0ccS97J WJYlwnZsaZ3NQTOpdZj267Wfr8zKElLaACQEftY5fbcVwyhhCvKJ08CB01dnJF8V Xb0mflSSWaJa1B2MYds3A0lvv7/DDOo8iQz7u42dGDR86wXRVfbdJgP1wL85aslY fWJU14mKPBIqEFaq7z6flPdChmsYcV89HuGdngDh2Gw9K29QvAN4LIZbSh0bvVwA wAQ2iAuyvg3vy4i2npwu =Icc5 -END PGP SIGNATURE- ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
On Friday 01 January 2016 21:23:36 Simon Kelley wrote: > On 23/12/15 21:10, Pali Rohár wrote: > > This patch allows to assign one IPv6 address for more config > > entries specified by MAC address. This is similar function as for > > IPv4 addresses in DHCPv4 server code part. > > This needs some thinking about: DHCPv6 is different from DHCPv4 in > that clients are not, at all, identified by MAC address, rather by > client-id and IAID. I know and this is absolutely uncomfortable for me. One client has different DUID across different operating systems. Also different across OS reinstalling... Also if I want to connect new device I need to instruct people how to set stable DUID across all OS... Just not usable for normal usage of "any" device. For identifying computer/device I need some stable identifier and DHCPv6 DUID is *not* stable in current implementation of major usage OS. MAC address of network card is stable. And so this identifier is what I prefer to use. dnsmasq has for it support and I'm happy for it! And when I configure both DHCPv4 and DHCPv6 one configuration line MAC,ipv4,ipv6 is really nice for having "clean" configuration. > In addition, DHCPv6 handles multiple addresses > and leases per client. When using just DUID I have problem here. My laptop has both Wifi and wired ethernet and with DUID information I'm not able to configure dnsmasq for stable ipv6 addresses. > What's important? To be able to specify more than on MAC address, any > one of which can be matched, or to have a single IPv6 address which > is removed from one IAID to another if the MAC addresses are paired? For specified laptops, I have special configuration. All network interfaces (one wifi, one wired ethernet) on those laptops is assigned same IP address. Operating system is configured in special way that when both interfaces are active it send packets *only* via ethernet. So it allows me to have active TCP connections and allows me to switch between wifi/ethernet without dropping it. DHCPv4 in dnsmasq has already support for assigning one ip address to more MAC addresses (more clients) and this my patch add support for it too. -- Pali Rohár pali.ro...@gmail.com signature.asc Description: This is a digitally signed message part. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] [PATCH] DHCPv6: Add support for more than one hardware address per IPv6 address
On 23/12/15 21:10, Pali Rohár wrote: > This patch allows to assign one IPv6 address for more config entries > specified by MAC address. This is similar function as for IPv4 addresses > in DHCPv4 server code part. This needs some thinking about: DHCPv6 is different from DHCPv4 in that clients are not, at all, identified by MAC address, rather by client-id and IAID. In addition, DHCPv6 handles multiple addresses and leases per client. What's important? To be able to specify more than on MAC address, any one of which can be matched, or to have a single IPv6 address which is removed from one IAID to another if the MAC addresses are paired? Cheers, Simon. > --- > man/dnsmasq.8 |9 ++--- > src/rfc3315.c | 63 > - > 2 files changed, 60 insertions(+), 12 deletions(-) > > diff --git a/man/dnsmasq.8 b/man/dnsmasq.8 > index d51b10f..6a121fe 100644 > --- a/man/dnsmasq.8 > +++ b/man/dnsmasq.8 > @@ -978,10 +978,13 @@ will only match a > Token-Ring hardware address, since the ARP-address type for token ring > is 6. > > -As a special case, in DHCPv4, it is possible to include more than one > -hardware address. eg: > +It is possible to include more than one hardware address. eg for IPv4: > .B --dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.2 > -This allows an IP address to be associated with > +or for IPv6: > +.B --dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,[::2] > +or for both: > +.B --dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.2,[::2] > +This allows an IPv4 and/or IPv6 address to be associated with > multiple hardware addresses, and gives dnsmasq permission to abandon a > DHCP lease to one of the hardware addresses when another one asks for > a lease. Beware that this is a dangerous thing to do, it will only > diff --git a/src/rfc3315.c b/src/rfc3315.c > index 3ed8623..19738b4 100644 > --- a/src/rfc3315.c > +++ b/src/rfc3315.c > @@ -54,7 +54,7 @@ static struct prefix_class > *prefix_class_from_context(struct dhcp_context *conte > #endif > static void mark_context_used(struct state *state, struct in6_addr *addr); > static void mark_config_used(struct dhcp_context *context, struct in6_addr > *addr); > -static int check_address(struct state *state, struct in6_addr *addr); > +static int check_address(struct state *state, struct dhcp_config *config, > struct in6_addr *addr); > static void add_address(struct state *state, struct dhcp_context *context, > unsigned int lease_time, void *ia_option, > unsigned int *min_time, struct in6_addr *addr, time_t > now); > static void update_leases(struct state *state, struct dhcp_context *context, > struct in6_addr *addr, unsigned int lease_time, time_t now); > @@ -704,7 +704,7 @@ static int dhcp6_no_relay(struct state *state, int > msg_type, void *inbuff, size_ > /* If the client asks for an address on the same network as > a configured address, > offer the configured address instead, to make moving to > newly-configured > addresses automatic. */ > - if (!(c->flags & CONTEXT_CONF_USED) && config_valid(config, > c, &addr) && check_address(state, &addr)) > + if (!(c->flags & CONTEXT_CONF_USED) && config_valid(config, > c, &addr) && check_address(state, config, &addr)) > { > req_addr = &addr; > mark_config_used(c, &addr); > @@ -713,8 +713,14 @@ static int dhcp6_no_relay(struct state *state, int > msg_type, void *inbuff, size_ > } > else if (!(c = address6_available(state->context, req_addr, > solicit_tags, plain_range))) > continue; /* not an address we're allowed */ > - else if (!check_address(state, req_addr)) > + else if (!check_address(state, config, req_addr)) > continue; /* address leased elsewhere */ > + else if (state->mac_len && config && > + config_has_mac(config, state->mac, state->mac_len, > state->mac_type) && > + match_netid(c->filter, solicit_tags, plain_range) > && > + config_valid(config, c, &addr) && > + !IN6_ARE_ADDR_EQUAL(req_addr, &addr)) > + continue; /* another static address is configured */ > > /* add address to output packet */ > #ifdef OPTION6_PREFIX_CLASS > @@ -730,10 +736,13 @@ static int dhcp6_no_relay(struct state *state, int > msg_type, void *inbuff, size_ > > /* Suggest configured address(es) */ > for (c = state->context; c; c = c->current) > - if (!(c->flags & CONTEXT_CONF_USED) && > + if ((!(c->flags & CONTEXT_CONF_USED) || > +(state->mac_len && config && > + config_has_mac(config, state->ma