summaryrefslogtreecommitdiffstats
path: root/userspace
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2002-08-18 14:21:19 +0000
committerBart De Schuymer <bdschuym@pandora.be>2002-08-18 14:21:19 +0000
commitf9cb1de4be07682de4fefb3e3226e87b47f766bc (patch)
tree4aae1411206aba3166ede26d587593426e1f75e7 /userspace
parent94d5191b4ddec7ab7d1df391acd5a2f3202951a5 (diff)
tell user max interface name length
Diffstat (limited to 'userspace')
-rw-r--r--userspace/ebtables2/ebtables.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/userspace/ebtables2/ebtables.c b/userspace/ebtables2/ebtables.c
index fd4a551..28da8d7 100644
--- a/userspace/ebtables2/ebtables.c
+++ b/userspace/ebtables2/ebtables.c
@@ -1464,6 +1464,8 @@ static void get_kernel_table(const char *modprobe)
}
}
+#define print_if_l_error print_error("Interface name length must be less " \
+ "than %d", IFNAMSIZ)
#define OPT_COMMAND 0x01
#define OPT_TABLE 0x02
#define OPT_IN 0x04
@@ -1748,7 +1750,7 @@ int main(int argc, char *argv[])
print_error("No in-interface "
"specified");
if (strlen(argv[optind - 1]) >= IFNAMSIZ)
- print_error("Illegal interface length");
+ print_if_l_error;
strcpy(new_entry->in, argv[optind - 1]);
break;
}
@@ -1766,7 +1768,7 @@ int main(int argc, char *argv[])
print_error("No logical in-interface "
"specified");
if (strlen(argv[optind - 1]) >= IFNAMSIZ)
- print_error("Illegal interface length");
+ print_if_l_error;
strcpy(new_entry->logical_in, argv[optind - 1]);
break;
}
@@ -1784,8 +1786,7 @@ int main(int argc, char *argv[])
"specified");
if (strlen(argv[optind - 1]) >= IFNAMSIZ)
- print_error("Illegal interface "
- "length");
+ print_if_l_error;
strcpy(new_entry->out, argv[optind - 1]);
break;
}
@@ -1803,8 +1804,7 @@ int main(int argc, char *argv[])
"specified");
if (strlen(argv[optind - 1]) >= IFNAMSIZ)
- print_error("Illegal interface "
- "length");
+ print_if_l_error;
strcpy(new_entry->logical_out,
argv[optind - 1]);
break;