]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Add noipv4 and noipv6 options.
authorRoy Marples <roy@marples.name>
Thu, 10 Oct 2013 09:22:44 +0000 (09:22 +0000)
committerRoy Marples <roy@marples.name>
Thu, 10 Oct 2013 09:22:44 +0000 (09:22 +0000)
dhcpcd.conf.5.in
if-options.c

index 84e7c03ff4d2b993ea001b244c31d2e4163417bf..99d797bae3bb466fc87c14a3c118d48346d07f77 100644 (file)
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd September 12, 2013
+.Dd October 10, 2013
 .Dt DHCPCD.CONF 5 SMM
 .Os
 .Sh NAME
@@ -285,12 +285,16 @@ So to stop
 .Nm dhcpcd
 from touching your DNS or MTU settings you would do:-
 .D1 nohook resolv.conf, mtu
+.It Ic noipv4
+Don't attempt to configure an IPv4 address.
 .It Ic noipv4ll
 Don't attempt to obtain an IPv4LL address if we failed to get one via DHCP.
 See
 .Rs
 .%T "RFC 3927"
 .Re
+.It Ic noipv6
+Don't attmept to configure an IPv6 address.
 .It Ic noipv6rs
 Disable solicitation and receipt of IPv6 Router Advertisements.
 .It Ic nolink
index 97d1e12e7a459dff3923d8ab7fe6af3734f64f7b..e7841c4b095ddd7805a18a1283d5dc3f4436df95 100644 (file)
@@ -70,6 +70,8 @@ unsigned long long options = 0;
 #define O_HOSTNAME_SHORT       O_BASE + 13
 #define O_DEV                  O_BASE + 14
 #define O_NODEV                        O_BASE + 15
+#define O_NOIPV4               O_BASE + 16
+#define O_NOIPV6               O_BASE + 17
 
 char *dev_load;
 
@@ -129,6 +131,8 @@ const struct option cf_options[] = {
        {"ipv6ra_own_default", no_argument,    NULL, O_IPV6RA_OWN_D},
        {"ipv4only",        no_argument,       NULL, '4'},
        {"ipv6only",        no_argument,       NULL, '6'},
+       {"noipv4",          no_argument,       NULL, O_NOIPV4},
+       {"noipv6",          no_argument,       NULL, O_NOIPV6},
        {"noalias",         no_argument,       NULL, O_NOALIAS},
        {"ia_na",           no_argument,       NULL, O_IA_NA},
        {"ia_ta",           no_argument,       NULL, O_IA_TA},
@@ -909,6 +913,12 @@ parse_option(struct if_options *ifo, int opt, const char *arg)
                ifo->options &= ~DHCPCD_IPV4;
                ifo->options |= DHCPCD_IPV6;
                break;
+       case O_NOIPV4:
+               ifo->options &= ~DHCPCD_IPV4;
+               break;
+       case O_NOIPV6:
+               ifo->options &= ~DHCPCD_IPV6;
+               break;
 #ifdef INET
        case O_ARPING:
                if (parse_addr(&addr, NULL, arg) != 0)