Bug 4907 - --disable-ipv6 disables -4 option
Summary: --disable-ipv6 disables -4 option
Status: RESOLVED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 2.6.9
Hardware: Other Linux
: P3 trivial (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-21 14:18 UTC by Sami Farin
Modified: 2007-08-21 19:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sami Farin 2007-08-21 14:18:22 UTC
# I do not like update my scripts every time I happen to run different rsync.
# So why not let -4 option exist even when someone has done --disable-ipv6 ?
#
--- rsync-2.6.9/options.c.bak	2006-11-07 16:25:52.617307000 +0200
+++ rsync-2.6.9/options.c	2007-08-21 21:12:17.462669790 +0300
@@ -533,8 +533,8 @@ static struct poptOption long_options[] 
   {"rsh",             'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
   {"rsync-path",       0,  POPT_ARG_STRING, &rsync_path, 0, 0, 0 },
   {"temp-dir",        'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
-#ifdef INET6
   {"ipv4",            '4', POPT_ARG_VAL,    &default_af_hint, AF_INET, 0, 0 },
+#ifdef INET6
   {"ipv6",            '6', POPT_ARG_VAL,    &default_af_hint, AF_INET6, 0, 0 },
 #endif
   {"8-bit-output",    '8', POPT_ARG_NONE,   &allow_8bit_chars, 0, 0, 0 },
@@ -588,8 +588,8 @@ static struct poptOption long_daemon_opt
   {"bwlimit",          0,  POPT_ARG_INT,    &daemon_bwlimit, 0, 0, 0 },
   {"config",           0,  POPT_ARG_STRING, &config_file, 0, 0, 0 },
   {"daemon",           0,  POPT_ARG_NONE,   &daemon_opt, 0, 0, 0 },
-#ifdef INET6
   {"ipv4",            '4', POPT_ARG_VAL,    &default_af_hint, AF_INET, 0, 0 },
+#ifdef INET6
   {"ipv6",            '6', POPT_ARG_VAL,    &default_af_hint, AF_INET6, 0, 0 },
 #endif
   {"detach",           0,  POPT_ARG_VAL,    &no_detach, 0, 0, 0 },
Comment 1 Wayne Davison 2007-08-21 19:42:44 UTC
Seems reasonable to me.  I'm also going to leave the -6 option in place as well, but am considering if I want to make it turn into a no-op, or have rsync warn and continue.

In any case, the CVS version now always includes the -4 option.