--- Begin Message ---
Hi
I use zcip on a machine with some other (more standard) interfaces.
I would thus like zcip not to add a default route through its interface.
Please consider my patch which adds an option (--nodefaultroute)
which stops zcip from adding a default route. This patch applies to
the Debian version 4-4 of zcip.
thanks
Stuart
*** zcip-4/zcip.c Tue Feb 24 16:04:14 2004
--- /home/pook/s/zcip-4/zcip.c Tue Feb 24 16:08:55 2004
***************
*** 1224,1229 ****
--- 1224,1230 ----
Zeroconf IPv4 Link-Local Address Configuration\n\
OPTIONS:\n\
-h, --help Print this help, and exit.\n\
+ -d, --nodefaultroute Do not add a default route through this
interface.\n\
-i, --interface IFNAME Use interface IFNAME.\n\
If not provided it uses 'eth0'.\n\
-r, --randseed Seeds RNG with random # rather than MAC
address.\n\
***************
*** 1252,1257 ****
--- 1253,1259 ----
{"interface",required_argument, NULL, 'i' },
{"randseed",no_argument, NULL, 'r'},
{"syslog", no_argument, NULL, 's' },
+ {"nodefaultroute", no_argument, NULL, 'd' },
{0,0,0,0},
};
***************
*** 1259,1271 ****
struct zc_if interface0;
interface0.if_name = "eth0";
!
! while ((c = getopt_long(argc, argv, "rshi:v",longopts, NULL)) != EOF) {
switch (c) {
case 'h':
usage(0);
case 'i':
interface0.if_name = optarg;
break;
--- 1261,1277 ----
struct zc_if interface0;
interface0.if_name = "eth0";
+ int default_route = 1;
! while ((c = getopt_long(argc, argv, "drshi:v",longopts, NULL)) != EOF) {
switch (c) {
case 'h':
usage(0);
+ case 'd':
+ default_route = 0;
+ break;
+
case 'i':
interface0.if_name = optarg;
break;
***************
*** 1348,1354 ****
start_listening_for_collisions(&interface0);
// use if_name as the default route
! set_default_route(&interface0);
if (claim_address(&interface0) != 0) {
ifdown(&interface0);
--- 1354,1361 ----
start_listening_for_collisions(&interface0);
// use if_name as the default route
! if (default_route)
! set_default_route(&interface0);
if (claim_address(&interface0) != 0) {
ifdown(&interface0);
*** zcip-4/zcip.8 Wed Sep 11 00:14:10 2002
--- /home/pook/s/zcip-4/zcip.8 Tue Feb 24 15:30:26 2004
***************
*** 11,16 ****
--- 11,19 ----
Link-Local Addresses'.
.SH OPTIONS
.TP
+ .B "[--nodefaultroute]", "[-d]"
+ Do not add a default route through this interface.
+ .TP
.B "[--help]", "[-h]"
Provide brief help and usage information, and exit.
.TP
--- End Message ---