mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-20 02:38:32 +00:00
Allow more than one --bridge-interface option to refer to an interface.
This commit is contained in:
@@ -23,6 +23,14 @@ version 2.79
|
|||||||
time validation when --dnssec-no-timecheck is in use.
|
time validation when --dnssec-no-timecheck is in use.
|
||||||
Note that this is an incompatible change from earlier releases.
|
Note that this is an incompatible change from earlier releases.
|
||||||
|
|
||||||
|
Allow more than one --bridge-interface option to refer to an
|
||||||
|
interface, so that we can use
|
||||||
|
--bridge-interface=int1,alias1
|
||||||
|
--bridge-interface=int1,alias2
|
||||||
|
as an alternative to
|
||||||
|
--bridge-interface=int1,alias1,alias2
|
||||||
|
Thanks to Neil Jerram for work on this.
|
||||||
|
|
||||||
|
|
||||||
version 2.78
|
version 2.78
|
||||||
Fix logic of appending ".<layer>" to PXE basename. Thanks to Chris
|
Fix logic of appending ".<layer>" to PXE basename. Thanks to Chris
|
||||||
|
|||||||
@@ -1695,13 +1695,17 @@ option also forces the leasechange script to be called on changes
|
|||||||
to the client-id and lease length and expiry time.
|
to the client-id and lease length and expiry time.
|
||||||
.TP
|
.TP
|
||||||
.B --bridge-interface=<interface>,<alias>[,<alias>]
|
.B --bridge-interface=<interface>,<alias>[,<alias>]
|
||||||
Treat DHCP (v4 and v6) request and IPv6 Router Solicit packets
|
Treat DHCP (v4 and v6) requests and IPv6 Router Solicit packets
|
||||||
arriving at any of the <alias> interfaces as if they had arrived at
|
arriving at any of the <alias> interfaces as if they had arrived at
|
||||||
<interface>. This option allows dnsmasq to provide DHCP and RA
|
<interface>. This option allows dnsmasq to provide DHCP and RA
|
||||||
service over unaddressed and unbridged Ethernet interfaces, e.g. on an
|
service over unaddressed and unbridged Ethernet interfaces, e.g. on an
|
||||||
OpenStack compute host where each such interface is a TAP interface to
|
OpenStack compute host where each such interface is a TAP interface to
|
||||||
a VM, or as in "old style bridging" on BSD platforms. A trailing '*'
|
a VM, or as in "old style bridging" on BSD platforms. A trailing '*'
|
||||||
wildcard can be used in each <alias>.
|
wildcard can be used in each <alias>.
|
||||||
|
|
||||||
|
It is permissible to add more than one alias using more than one --bridge-interface option since
|
||||||
|
--bridge-interface=int1,alias1,alias2 is exactly equivalent to
|
||||||
|
--bridge-interface=int1,alias1 --bridge-interface=int1,alias2
|
||||||
.TP
|
.TP
|
||||||
.B \-s, --domain=<domain>[,<address range>[,local]]
|
.B \-s, --domain=<domain>[,<address range>[,local]]
|
||||||
Specifies DNS domains for the DHCP server. Domains may be be given
|
Specifies DNS domains for the DHCP server. Domains may be be given
|
||||||
|
|||||||
19
src/option.c
19
src/option.c
@@ -2733,14 +2733,23 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
|
|
||||||
case LOPT_BRIDGE: /* --bridge-interface */
|
case LOPT_BRIDGE: /* --bridge-interface */
|
||||||
{
|
{
|
||||||
struct dhcp_bridge *new = opt_malloc(sizeof(struct dhcp_bridge));
|
struct dhcp_bridge *new;
|
||||||
|
|
||||||
if (!(comma = split(arg)) || strlen(arg) > IF_NAMESIZE - 1 )
|
if (!(comma = split(arg)) || strlen(arg) > IF_NAMESIZE - 1 )
|
||||||
ret_err(_("bad bridge-interface"));
|
ret_err(_("bad bridge-interface"));
|
||||||
|
|
||||||
strcpy(new->iface, arg);
|
for (new = daemon->bridges; new; new = new->next)
|
||||||
new->alias = NULL;
|
if (strcmp(new->iface, arg) == 0)
|
||||||
new->next = daemon->bridges;
|
break;
|
||||||
daemon->bridges = new;
|
|
||||||
|
if (!new)
|
||||||
|
{
|
||||||
|
new = opt_malloc(sizeof(struct dhcp_bridge));
|
||||||
|
strcpy(new->iface, arg);
|
||||||
|
new->alias = NULL;
|
||||||
|
new->next = daemon->bridges;
|
||||||
|
daemon->bridges = new;
|
||||||
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
arg = comma;
|
arg = comma;
|
||||||
|
|||||||
Reference in New Issue
Block a user