Date: Sun, 14 Aug 2016 18:34:16 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304089 - head/sbin/ipfw Message-ID: <201608141834.u7EIYGwf035898@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ae Date: Sun Aug 14 18:34:16 2016 New Revision: 304089 URL: https://svnweb.freebsd.org/changeset/base/304089 Log: Add an ability to attach comment to check-state rules. MFC after: 1 week Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Sun Aug 14 18:30:30 2016 (r304088) +++ head/sbin/ipfw/ipfw2.c Sun Aug 14 18:34:16 2016 (r304089) @@ -4120,8 +4120,17 @@ chkarg: cmd = next_cmd(cmd, &cblen); } - if (have_state) /* must be a check-state, we are done */ + if (have_state) { /* must be a check-state, we are done */ + if (*av != NULL && + match_token(rule_options, *av) == TOK_COMMENT) { + /* check-state has a comment */ + av++; + fill_comment(cmd, av, cblen); + cmd = next_cmd(cmd, &cblen); + av[0] = NULL; + } goto done; + } #define OR_START(target) \ if (av[0] && (*av[0] == '(' || *av[0] == '{')) { \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608141834.u7EIYGwf035898>