" --lsrr (match loose source routing flag)\n"
" --no-srr (match packets with no source routing)\n\n"
" [!] --rr (match record route flag)\n\n"
-" [!] --ts (match timestamp flag)\n\n",
+" [!] --ts (match timestamp flag)\n\n"
+" [!] --ra (match router-alert option)\n\n",
NETFILTER_VERSION);
}
{ "no-srr", 0, 0, '3'},
{ "rr", 0, 0, '4'},
{ "ts", 0, 0, '5'},
+ { "ra", 0, 0, '6'},
{0}
};
}
break;
+ /* router-alert */
+ case '6':
+ if ((!invert) && (*flags & IPT_IPV4OPTION_MATCH_ROUTER_ALERT))
+ exit_error(PARAMETER_PROBLEM,
+ "Can't specify --ra twice");
+ if (invert && (*flags & IPT_IPV4OPTION_DONT_MATCH_ROUTER_ALERT))
+ exit_error(PARAMETER_PROBLEM,
+ "Can't specify ! --rr twice");
+ if ((!invert) && (*flags & IPT_IPV4OPTION_DONT_MATCH_ROUTER_ALERT))
+ exit_error(PARAMETER_PROBLEM,
+ "Can't specify --ra with ! --ra");
+ if (invert && (*flags & IPT_IPV4OPTION_MATCH_ROUTER_ALERT))
+ exit_error(PARAMETER_PROBLEM,
+ "Can't specify ! --ra with --ra");
+ if (invert) {
+ info->options |= IPT_IPV4OPTION_DONT_MATCH_ROUTER_ALERT;
+ *flags |= IPT_IPV4OPTION_DONT_MATCH_ROUTER_ALERT;
+ }
+ else {
+ info->options |= IPT_IPV4OPTION_MATCH_ROUTER_ALERT;
+ *flags |= IPT_IPV4OPTION_MATCH_ROUTER_ALERT;
+ }
+ break;
+
default:
return 0;
}
printf(" TS");
else if (info->options & IPT_IPV4OPTION_DONT_MATCH_TIMESTAMP)
printf(" !TS");
+ if (info->options & IPT_IPV4OPTION_MATCH_ROUTER_ALERT)
+ printf(" RA");
+ else if (info->options & IPT_IPV4OPTION_DONT_MATCH_ROUTER_ALERT)
+ printf(" !RA");
+
printf(" ");
}
printf(" --ts");
else if (info->options & IPT_IPV4OPTION_DONT_MATCH_TIMESTAMP)
printf(" ! --ts");
+ if (info->options & IPT_IPV4OPTION_MATCH_ROUTER_ALERT)
+ printf(" --ra");
+ else if (info->options & IPT_IPV4OPTION_DONT_MATCH_ROUTER_ALERT)
+ printf(" ! --ra");
+
printf(" ");
}