Skip to content

Commit

Permalink
xtables: print enabled status on startup
Browse files Browse the repository at this point in the history
Meant to test #372.
  • Loading branch information
ydahhrk committed Jan 19, 2022
1 parent 81d6ad1 commit 04ef98d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/xlat.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define JOOL_VERSION_MAJOR 4
#define JOOL_VERSION_MINOR 1
#define JOOL_VERSION_REV 6
#define JOOL_VERSION_DEV 0
#define JOOL_VERSION_DEV 1

/** See http://stackoverflow.com/questions/195975 */
#define STR_VALUE(arg) #arg
Expand Down
7 changes: 7 additions & 0 deletions src/mod/nat64/jool.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ static int __init nat64_init(void)

pr_debug("%s", banner);
pr_debug("Inserting NAT64 Jool...\n");

#ifdef XTABLES_DISABLED
pr_info("(Xtables disabled)\n");
#else
pr_info("(Xtables enabled)\n");
#endif

/* Careful with the order */

error = register_pernet_subsys(&joolns_ops);
Expand Down
7 changes: 7 additions & 0 deletions src/mod/siit/jool_siit.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ static int __init siit_init(void)
int error;

pr_debug("Inserting SIIT Jool...\n");

#ifdef XTABLES_DISABLED
pr_info("(Xtables disabled)\n");
#else
pr_info("(Xtables enabled)\n");
#endif

/* Careful with the order */

error = register_pernet_subsys(&joolns_ops);
Expand Down
6 changes: 6 additions & 0 deletions src/usr/argp/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,12 @@ int jool_main(int argc, char **argv)
char *iname = NULL;
struct jool_result result;

#ifdef XTABLES_DISABLED
printf("(Xtables disabled)\n");
#else
printf("(Xtables enabled)\n");
#endif

if (argc == 1)
return show_help(argv[0]);

Expand Down

0 comments on commit 04ef98d

Please sign in to comment.