Deleted Added
full compact
parse.y (284777) parse.y (287009)
1/* $OpenBSD: parse.y,v 1.554 2008/10/17 12:59:53 henning Exp $ */
2
3/*
4 * Copyright (c) 2001 Markus Friedl. All rights reserved.
5 * Copyright (c) 2001 Daniel Hartmeier. All rights reserved.
6 * Copyright (c) 2001 Theo de Raadt. All rights reserved.
7 * Copyright (c) 2002,2003 Henning Brauer. All rights reserved.
8 *

--- 14 unchanged lines hidden (view full) ---

23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29%{
30#include <sys/cdefs.h>
1/* $OpenBSD: parse.y,v 1.554 2008/10/17 12:59:53 henning Exp $ */
2
3/*
4 * Copyright (c) 2001 Markus Friedl. All rights reserved.
5 * Copyright (c) 2001 Daniel Hartmeier. All rights reserved.
6 * Copyright (c) 2001 Theo de Raadt. All rights reserved.
7 * Copyright (c) 2002,2003 Henning Brauer. All rights reserved.
8 *

--- 14 unchanged lines hidden (view full) ---

23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29%{
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sbin/pfctl/parse.y 284777 2015-06-24 19:16:41Z eri $");
31__FBSDID("$FreeBSD: head/sbin/pfctl/parse.y 287009 2015-08-21 22:02:22Z loos $");
32
33#include <sys/types.h>
34#include <sys/socket.h>
35#include <sys/stat.h>
36#ifdef __FreeBSD__
37#include <sys/sysctl.h>
38#endif
39#include <net/if.h>
40#include <netinet/in.h>
41#include <netinet/in_systm.h>
42#include <netinet/ip.h>
43#include <netinet/ip_icmp.h>
44#include <netinet/icmp6.h>
45#include <net/pfvar.h>
46#include <arpa/inet.h>
47#include <net/altq/altq.h>
48#include <net/altq/altq_cbq.h>
32
33#include <sys/types.h>
34#include <sys/socket.h>
35#include <sys/stat.h>
36#ifdef __FreeBSD__
37#include <sys/sysctl.h>
38#endif
39#include <net/if.h>
40#include <netinet/in.h>
41#include <netinet/in_systm.h>
42#include <netinet/ip.h>
43#include <netinet/ip_icmp.h>
44#include <netinet/icmp6.h>
45#include <net/pfvar.h>
46#include <arpa/inet.h>
47#include <net/altq/altq.h>
48#include <net/altq/altq_cbq.h>
49#include <net/altq/altq_codel.h>
49#include <net/altq/altq_priq.h>
50#include <net/altq/altq_hfsc.h>
51#include <net/altq/altq_fairq.h>
52
53#include <stdio.h>
54#include <unistd.h>
55#include <stdlib.h>
56#include <netdb.h>

--- 237 unchanged lines hidden (view full) ---

294#define POM_STICKYADDRESS 0x02
295 u_int8_t opts;
296 int type;
297 int staticport;
298 struct pf_poolhashkey *key;
299
300} pool_opts;
301
50#include <net/altq/altq_priq.h>
51#include <net/altq/altq_hfsc.h>
52#include <net/altq/altq_fairq.h>
53
54#include <stdio.h>
55#include <unistd.h>
56#include <stdlib.h>
57#include <netdb.h>

--- 237 unchanged lines hidden (view full) ---

295#define POM_STICKYADDRESS 0x02
296 u_int8_t opts;
297 int type;
298 int staticport;
299 struct pf_poolhashkey *key;
300
301} pool_opts;
302
302
303struct codel_opts codel_opts;
303struct node_hfsc_opts hfsc_opts;
304struct node_fairq_opts fairq_opts;
305struct node_state_opt *keep_state_defaults = NULL;
306
307int disallow_table(struct node_host *, const char *);
308int disallow_urpf_failed(struct node_host *, const char *);
309int disallow_alias(struct node_host *, const char *);
310int rule_consistent(struct pf_rule *, int);

--- 109 unchanged lines hidden (view full) ---

420 struct filter_opts filter_opts;
421 struct antispoof_opts antispoof_opts;
422 struct queue_opts queue_opts;
423 struct scrub_opts scrub_opts;
424 struct table_opts table_opts;
425 struct pool_opts pool_opts;
426 struct node_hfsc_opts hfsc_opts;
427 struct node_fairq_opts fairq_opts;
304struct node_hfsc_opts hfsc_opts;
305struct node_fairq_opts fairq_opts;
306struct node_state_opt *keep_state_defaults = NULL;
307
308int disallow_table(struct node_host *, const char *);
309int disallow_urpf_failed(struct node_host *, const char *);
310int disallow_alias(struct node_host *, const char *);
311int rule_consistent(struct pf_rule *, int);

--- 109 unchanged lines hidden (view full) ---

421 struct filter_opts filter_opts;
422 struct antispoof_opts antispoof_opts;
423 struct queue_opts queue_opts;
424 struct scrub_opts scrub_opts;
425 struct table_opts table_opts;
426 struct pool_opts pool_opts;
427 struct node_hfsc_opts hfsc_opts;
428 struct node_fairq_opts fairq_opts;
429 struct codel_opts codel_opts;
428 } v;
429 int lineno;
430} YYSTYPE;
431
432#define PPORT_RANGE 1
433#define PPORT_STAR 2
434int parseport(char *, struct range *r, int);
435

--- 8 unchanged lines hidden (view full) ---

444%token ICMP6TYPE CODE KEEP MODULATE STATE PORT RDR NAT BINAT ARROW NODF
445%token MINTTL ERROR ALLOWOPTS FASTROUTE FILENAME ROUTETO DUPTO REPLYTO NO LABEL
446%token NOROUTE URPFFAILED FRAGMENT USER GROUP MAXMSS MAXIMUM TTL TOS DROP TABLE
447%token REASSEMBLE FRAGDROP FRAGCROP ANCHOR NATANCHOR RDRANCHOR BINATANCHOR
448%token SET OPTIMIZATION TIMEOUT LIMIT LOGINTERFACE BLOCKPOLICY RANDOMID
449%token REQUIREORDER SYNPROXY FINGERPRINTS NOSYNC DEBUG SKIP HOSTID
450%token ANTISPOOF FOR INCLUDE
451%token BITMASK RANDOM SOURCEHASH ROUNDROBIN STATICPORT PROBABILITY
430 } v;
431 int lineno;
432} YYSTYPE;
433
434#define PPORT_RANGE 1
435#define PPORT_STAR 2
436int parseport(char *, struct range *r, int);
437

--- 8 unchanged lines hidden (view full) ---

446%token ICMP6TYPE CODE KEEP MODULATE STATE PORT RDR NAT BINAT ARROW NODF
447%token MINTTL ERROR ALLOWOPTS FASTROUTE FILENAME ROUTETO DUPTO REPLYTO NO LABEL
448%token NOROUTE URPFFAILED FRAGMENT USER GROUP MAXMSS MAXIMUM TTL TOS DROP TABLE
449%token REASSEMBLE FRAGDROP FRAGCROP ANCHOR NATANCHOR RDRANCHOR BINATANCHOR
450%token SET OPTIMIZATION TIMEOUT LIMIT LOGINTERFACE BLOCKPOLICY RANDOMID
451%token REQUIREORDER SYNPROXY FINGERPRINTS NOSYNC DEBUG SKIP HOSTID
452%token ANTISPOOF FOR INCLUDE
453%token BITMASK RANDOM SOURCEHASH ROUNDROBIN STATICPORT PROBABILITY
452%token ALTQ CBQ PRIQ HFSC FAIRQ BANDWIDTH TBRSIZE LINKSHARE REALTIME UPPERLIMIT
453%token QUEUE PRIORITY QLIMIT HOGS BUCKETS RTABLE
454%token ALTQ CBQ CODEL PRIQ HFSC FAIRQ BANDWIDTH TBRSIZE LINKSHARE REALTIME
455%token UPPERLIMIT QUEUE PRIORITY QLIMIT HOGS BUCKETS RTABLE TARGET INTERVAL
454%token LOAD RULESET_OPTIMIZATION
455%token STICKYADDRESS MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE
456%token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY
457%token TAGGED TAG IFBOUND FLOATING STATEPOLICY STATEDEFAULTS ROUTE SETTOS
458%token DIVERTTO DIVERTREPLY
459%token <v.string> STRING
460%token <v.number> NUMBER
461%token <v.i> PORTBINARY

--- 32 unchanged lines hidden (view full) ---

494%type <v.interface> antispoof_ifspc antispoof_iflst antispoof_if
495%type <v.qassign> qname
496%type <v.queue> qassign qassign_list qassign_item
497%type <v.queue_options> scheduler
498%type <v.number> cbqflags_list cbqflags_item
499%type <v.number> priqflags_list priqflags_item
500%type <v.hfsc_opts> hfscopts_list hfscopts_item hfsc_opts
501%type <v.fairq_opts> fairqopts_list fairqopts_item fairq_opts
456%token LOAD RULESET_OPTIMIZATION
457%token STICKYADDRESS MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE
458%token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY
459%token TAGGED TAG IFBOUND FLOATING STATEPOLICY STATEDEFAULTS ROUTE SETTOS
460%token DIVERTTO DIVERTREPLY
461%token <v.string> STRING
462%token <v.number> NUMBER
463%token <v.i> PORTBINARY

--- 32 unchanged lines hidden (view full) ---

496%type <v.interface> antispoof_ifspc antispoof_iflst antispoof_if
497%type <v.qassign> qname
498%type <v.queue> qassign qassign_list qassign_item
499%type <v.queue_options> scheduler
500%type <v.number> cbqflags_list cbqflags_item
501%type <v.number> priqflags_list priqflags_item
502%type <v.hfsc_opts> hfscopts_list hfscopts_item hfsc_opts
503%type <v.fairq_opts> fairqopts_list fairqopts_item fairq_opts
504%type <v.codel_opts> codelopts_list codelopts_item codel_opts
502%type <v.queue_bwspec> bandwidth
503%type <v.filter_opts> filter_opts filter_opt filter_opts_l
504%type <v.antispoof_opts> antispoof_opts antispoof_opt antispoof_opts_l
505%type <v.queue_opts> queue_opts queue_opt queue_opts_l
506%type <v.scrub_opts> scrub_opts scrub_opt scrub_opts_l
507%type <v.table_opts> table_opts table_opt table_opts_l
508%type <v.pool_opts> pool_opts pool_opt pool_opts_l
509%type <v.tagged> tagged

--- 955 unchanged lines hidden (view full) ---

1465 memset(&a, 0, sizeof(a));
1466 if ($3.scheduler.qtype == ALTQT_NONE) {
1467 yyerror("no scheduler specified!");
1468 YYERROR;
1469 }
1470 a.scheduler = $3.scheduler.qtype;
1471 a.qlimit = $3.qlimit;
1472 a.tbrsize = $3.tbrsize;
505%type <v.queue_bwspec> bandwidth
506%type <v.filter_opts> filter_opts filter_opt filter_opts_l
507%type <v.antispoof_opts> antispoof_opts antispoof_opt antispoof_opts_l
508%type <v.queue_opts> queue_opts queue_opt queue_opts_l
509%type <v.scrub_opts> scrub_opts scrub_opt scrub_opts_l
510%type <v.table_opts> table_opts table_opt table_opts_l
511%type <v.pool_opts> pool_opts pool_opt pool_opts_l
512%type <v.tagged> tagged

--- 955 unchanged lines hidden (view full) ---

1468 memset(&a, 0, sizeof(a));
1469 if ($3.scheduler.qtype == ALTQT_NONE) {
1470 yyerror("no scheduler specified!");
1471 YYERROR;
1472 }
1473 a.scheduler = $3.scheduler.qtype;
1474 a.qlimit = $3.qlimit;
1475 a.tbrsize = $3.tbrsize;
1473 if ($5 == NULL) {
1476 if ($5 == NULL && $3.scheduler.qtype != ALTQT_CODEL) {
1474 yyerror("no child queues specified");
1475 YYERROR;
1476 }
1477 if (expand_altq(&a, $2, $5, $3.queue_bwspec,
1478 &$3.scheduler))
1479 YYERROR;
1480 }
1481 ;

--- 185 unchanged lines hidden (view full) ---

1667 $$.qtype = ALTQT_FAIRQ;
1668 bzero(&$$.data.fairq_opts,
1669 sizeof(struct node_fairq_opts));
1670 }
1671 | FAIRQ '(' fairq_opts ')' {
1672 $$.qtype = ALTQT_FAIRQ;
1673 $$.data.fairq_opts = $3;
1674 }
1477 yyerror("no child queues specified");
1478 YYERROR;
1479 }
1480 if (expand_altq(&a, $2, $5, $3.queue_bwspec,
1481 &$3.scheduler))
1482 YYERROR;
1483 }
1484 ;

--- 185 unchanged lines hidden (view full) ---

1670 $$.qtype = ALTQT_FAIRQ;
1671 bzero(&$$.data.fairq_opts,
1672 sizeof(struct node_fairq_opts));
1673 }
1674 | FAIRQ '(' fairq_opts ')' {
1675 $$.qtype = ALTQT_FAIRQ;
1676 $$.data.fairq_opts = $3;
1677 }
1678 | CODEL {
1679 $$.qtype = ALTQT_CODEL;
1680 bzero(&$$.data.codel_opts,
1681 sizeof(struct codel_opts));
1682 }
1683 | CODEL '(' codel_opts ')' {
1684 $$.qtype = ALTQT_CODEL;
1685 $$.data.codel_opts = $3;
1686 }
1675 ;
1676
1677cbqflags_list : cbqflags_item { $$ |= $1; }
1678 | cbqflags_list comma cbqflags_item { $$ |= $3; }
1679 ;
1680
1681cbqflags_item : STRING {
1682 if (!strcmp($1, "default"))
1683 $$ = CBQCLF_DEFCLASS;
1684 else if (!strcmp($1, "borrow"))
1685 $$ = CBQCLF_BORROW;
1686 else if (!strcmp($1, "red"))
1687 $$ = CBQCLF_RED;
1688 else if (!strcmp($1, "ecn"))
1689 $$ = CBQCLF_RED|CBQCLF_ECN;
1690 else if (!strcmp($1, "rio"))
1691 $$ = CBQCLF_RIO;
1687 ;
1688
1689cbqflags_list : cbqflags_item { $$ |= $1; }
1690 | cbqflags_list comma cbqflags_item { $$ |= $3; }
1691 ;
1692
1693cbqflags_item : STRING {
1694 if (!strcmp($1, "default"))
1695 $$ = CBQCLF_DEFCLASS;
1696 else if (!strcmp($1, "borrow"))
1697 $$ = CBQCLF_BORROW;
1698 else if (!strcmp($1, "red"))
1699 $$ = CBQCLF_RED;
1700 else if (!strcmp($1, "ecn"))
1701 $$ = CBQCLF_RED|CBQCLF_ECN;
1702 else if (!strcmp($1, "rio"))
1703 $$ = CBQCLF_RIO;
1704 else if (!strcmp($1, "codel"))
1705 $$ = CBQCLF_CODEL;
1692 else {
1693 yyerror("unknown cbq flag \"%s\"", $1);
1694 free($1);
1695 YYERROR;
1696 }
1697 free($1);
1698 }
1699 ;

--- 6 unchanged lines hidden (view full) ---

1706 if (!strcmp($1, "default"))
1707 $$ = PRCF_DEFAULTCLASS;
1708 else if (!strcmp($1, "red"))
1709 $$ = PRCF_RED;
1710 else if (!strcmp($1, "ecn"))
1711 $$ = PRCF_RED|PRCF_ECN;
1712 else if (!strcmp($1, "rio"))
1713 $$ = PRCF_RIO;
1706 else {
1707 yyerror("unknown cbq flag \"%s\"", $1);
1708 free($1);
1709 YYERROR;
1710 }
1711 free($1);
1712 }
1713 ;

--- 6 unchanged lines hidden (view full) ---

1720 if (!strcmp($1, "default"))
1721 $$ = PRCF_DEFAULTCLASS;
1722 else if (!strcmp($1, "red"))
1723 $$ = PRCF_RED;
1724 else if (!strcmp($1, "ecn"))
1725 $$ = PRCF_RED|PRCF_ECN;
1726 else if (!strcmp($1, "rio"))
1727 $$ = PRCF_RIO;
1728 else if (!strcmp($1, "codel"))
1729 $$ = PRCF_CODEL;
1714 else {
1715 yyerror("unknown priq flag \"%s\"", $1);
1716 free($1);
1717 YYERROR;
1718 }
1719 free($1);
1720 }
1721 ;

--- 84 unchanged lines hidden (view full) ---

1806 if (!strcmp($1, "default"))
1807 hfsc_opts.flags |= HFCF_DEFAULTCLASS;
1808 else if (!strcmp($1, "red"))
1809 hfsc_opts.flags |= HFCF_RED;
1810 else if (!strcmp($1, "ecn"))
1811 hfsc_opts.flags |= HFCF_RED|HFCF_ECN;
1812 else if (!strcmp($1, "rio"))
1813 hfsc_opts.flags |= HFCF_RIO;
1730 else {
1731 yyerror("unknown priq flag \"%s\"", $1);
1732 free($1);
1733 YYERROR;
1734 }
1735 free($1);
1736 }
1737 ;

--- 84 unchanged lines hidden (view full) ---

1822 if (!strcmp($1, "default"))
1823 hfsc_opts.flags |= HFCF_DEFAULTCLASS;
1824 else if (!strcmp($1, "red"))
1825 hfsc_opts.flags |= HFCF_RED;
1826 else if (!strcmp($1, "ecn"))
1827 hfsc_opts.flags |= HFCF_RED|HFCF_ECN;
1828 else if (!strcmp($1, "rio"))
1829 hfsc_opts.flags |= HFCF_RIO;
1830 else if (!strcmp($1, "codel"))
1831 hfsc_opts.flags |= HFCF_CODEL;
1814 else {
1815 yyerror("unknown hfsc flag \"%s\"", $1);
1816 free($1);
1817 YYERROR;
1818 }
1819 free($1);
1820 }
1821 ;

--- 39 unchanged lines hidden (view full) ---

1861 if (!strcmp($1, "default"))
1862 fairq_opts.flags |= FARF_DEFAULTCLASS;
1863 else if (!strcmp($1, "red"))
1864 fairq_opts.flags |= FARF_RED;
1865 else if (!strcmp($1, "ecn"))
1866 fairq_opts.flags |= FARF_RED|FARF_ECN;
1867 else if (!strcmp($1, "rio"))
1868 fairq_opts.flags |= FARF_RIO;
1832 else {
1833 yyerror("unknown hfsc flag \"%s\"", $1);
1834 free($1);
1835 YYERROR;
1836 }
1837 free($1);
1838 }
1839 ;

--- 39 unchanged lines hidden (view full) ---

1879 if (!strcmp($1, "default"))
1880 fairq_opts.flags |= FARF_DEFAULTCLASS;
1881 else if (!strcmp($1, "red"))
1882 fairq_opts.flags |= FARF_RED;
1883 else if (!strcmp($1, "ecn"))
1884 fairq_opts.flags |= FARF_RED|FARF_ECN;
1885 else if (!strcmp($1, "rio"))
1886 fairq_opts.flags |= FARF_RIO;
1887 else if (!strcmp($1, "codel"))
1888 fairq_opts.flags |= FARF_CODEL;
1869 else {
1870 yyerror("unknown fairq flag \"%s\"", $1);
1871 free($1);
1872 YYERROR;
1873 }
1874 free($1);
1875 }
1876 ;
1877
1889 else {
1890 yyerror("unknown fairq flag \"%s\"", $1);
1891 free($1);
1892 YYERROR;
1893 }
1894 free($1);
1895 }
1896 ;
1897
1898codel_opts : {
1899 bzero(&codel_opts,
1900 sizeof(struct codel_opts));
1901 }
1902 codelopts_list {
1903 $$ = codel_opts;
1904 }
1905 ;
1906
1907codelopts_list : codelopts_item
1908 | codelopts_list comma codelopts_item
1909 ;
1910
1911codelopts_item : INTERVAL number {
1912 if (codel_opts.interval) {
1913 yyerror("interval already specified");
1914 YYERROR;
1915 }
1916 codel_opts.interval = $2;
1917 }
1918 | TARGET number {
1919 if (codel_opts.target) {
1920 yyerror("target already specified");
1921 YYERROR;
1922 }
1923 codel_opts.target = $2;
1924 }
1925 | STRING {
1926 if (!strcmp($1, "ecn"))
1927 codel_opts.ecn = 1;
1928 else {
1929 yyerror("unknown codel option \"%s\"", $1);
1930 free($1);
1931 YYERROR;
1932 }
1933 free($1);
1934 }
1935 ;
1936
1878qassign : /* empty */ { $$ = NULL; }
1879 | qassign_item { $$ = $1; }
1880 | '{' optnl qassign_list '}' { $$ = $3; }
1881 ;
1882
1883qassign_list : qassign_item optnl { $$ = $1; }
1884 | qassign_list comma qassign_item optnl {
1885 $1->tail->next = $3;

--- 2909 unchanged lines hidden (view full) ---

4795 struct pf_altq pa, pb;
4796 char qname[PF_QNAME_SIZE];
4797 struct node_queue *n;
4798 struct node_queue_bw bw;
4799 int errs = 0;
4800
4801 if ((pf->loadopt & PFCTL_FLAG_ALTQ) == 0) {
4802 FREE_LIST(struct node_if, interfaces);
1937qassign : /* empty */ { $$ = NULL; }
1938 | qassign_item { $$ = $1; }
1939 | '{' optnl qassign_list '}' { $$ = $3; }
1940 ;
1941
1942qassign_list : qassign_item optnl { $$ = $1; }
1943 | qassign_list comma qassign_item optnl {
1944 $1->tail->next = $3;

--- 2909 unchanged lines hidden (view full) ---

4854 struct pf_altq pa, pb;
4855 char qname[PF_QNAME_SIZE];
4856 struct node_queue *n;
4857 struct node_queue_bw bw;
4858 int errs = 0;
4859
4860 if ((pf->loadopt & PFCTL_FLAG_ALTQ) == 0) {
4861 FREE_LIST(struct node_if, interfaces);
4803 FREE_LIST(struct node_queue, nqueues);
4862 if (nqueues)
4863 FREE_LIST(struct node_queue, nqueues);
4804 return (0);
4805 }
4806
4807 LOOP_THROUGH(struct node_if, interface, interfaces,
4808 memcpy(&pa, a, sizeof(struct pf_altq));
4809 if (strlcpy(pa.ifname, interface->ifname,
4810 sizeof(pa.ifname)) >= sizeof(pa.ifname))
4811 errx(1, "expand_altq: strlcpy");

--- 74 unchanged lines hidden (view full) ---

4886 else {
4887 queues->tail->next = n;
4888 queues->tail = n;
4889 }
4890 );
4891 }
4892 );
4893 FREE_LIST(struct node_if, interfaces);
4864 return (0);
4865 }
4866
4867 LOOP_THROUGH(struct node_if, interface, interfaces,
4868 memcpy(&pa, a, sizeof(struct pf_altq));
4869 if (strlcpy(pa.ifname, interface->ifname,
4870 sizeof(pa.ifname)) >= sizeof(pa.ifname))
4871 errx(1, "expand_altq: strlcpy");

--- 74 unchanged lines hidden (view full) ---

4946 else {
4947 queues->tail->next = n;
4948 queues->tail = n;
4949 }
4950 );
4951 }
4952 );
4953 FREE_LIST(struct node_if, interfaces);
4894 FREE_LIST(struct node_queue, nqueues);
4954 if (nqueues)
4955 FREE_LIST(struct node_queue, nqueues);
4895
4896 return (errs);
4897}
4898
4899int
4900expand_queue(struct pf_altq *a, struct node_if *interfaces,
4901 struct node_queue *nqueues, struct node_queue_bw bwspec,
4902 struct node_queue_opt *opts)

--- 389 unchanged lines hidden (view full) ---

5292 { "binat", BINAT},
5293 { "binat-anchor", BINATANCHOR},
5294 { "bitmask", BITMASK},
5295 { "block", BLOCK},
5296 { "block-policy", BLOCKPOLICY},
5297 { "buckets", BUCKETS},
5298 { "cbq", CBQ},
5299 { "code", CODE},
4956
4957 return (errs);
4958}
4959
4960int
4961expand_queue(struct pf_altq *a, struct node_if *interfaces,
4962 struct node_queue *nqueues, struct node_queue_bw bwspec,
4963 struct node_queue_opt *opts)

--- 389 unchanged lines hidden (view full) ---

5353 { "binat", BINAT},
5354 { "binat-anchor", BINATANCHOR},
5355 { "bitmask", BITMASK},
5356 { "block", BLOCK},
5357 { "block-policy", BLOCKPOLICY},
5358 { "buckets", BUCKETS},
5359 { "cbq", CBQ},
5360 { "code", CODE},
5361 { "codelq", CODEL},
5300 { "crop", FRAGCROP},
5301 { "debug", DEBUG},
5302 { "divert-reply", DIVERTREPLY},
5303 { "divert-to", DIVERTTO},
5304 { "drop", DROP},
5305 { "drop-ovl", FRAGDROP},
5306 { "dup-to", DUPTO},
5307 { "fairq", FAIRQ},

--- 13 unchanged lines hidden (view full) ---

5321 { "hostid", HOSTID},
5322 { "icmp-type", ICMPTYPE},
5323 { "icmp6-type", ICMP6TYPE},
5324 { "if-bound", IFBOUND},
5325 { "in", IN},
5326 { "include", INCLUDE},
5327 { "inet", INET},
5328 { "inet6", INET6},
5362 { "crop", FRAGCROP},
5363 { "debug", DEBUG},
5364 { "divert-reply", DIVERTREPLY},
5365 { "divert-to", DIVERTTO},
5366 { "drop", DROP},
5367 { "drop-ovl", FRAGDROP},
5368 { "dup-to", DUPTO},
5369 { "fairq", FAIRQ},

--- 13 unchanged lines hidden (view full) ---

5383 { "hostid", HOSTID},
5384 { "icmp-type", ICMPTYPE},
5385 { "icmp6-type", ICMP6TYPE},
5386 { "if-bound", IFBOUND},
5387 { "in", IN},
5388 { "include", INCLUDE},
5389 { "inet", INET},
5390 { "inet6", INET6},
5391 { "interval", INTERVAL},
5329 { "keep", KEEP},
5330 { "label", LABEL},
5331 { "limit", LIMIT},
5332 { "linkshare", LINKSHARE},
5333 { "load", LOAD},
5334 { "log", LOG},
5335 { "loginterface", LOGINTERFACE},
5336 { "max", MAXIMUM},

--- 53 unchanged lines hidden (view full) ---

5390 { "state-defaults", STATEDEFAULTS},
5391 { "state-policy", STATEPOLICY},
5392 { "static-port", STATICPORT},
5393 { "sticky-address", STICKYADDRESS},
5394 { "synproxy", SYNPROXY},
5395 { "table", TABLE},
5396 { "tag", TAG},
5397 { "tagged", TAGGED},
5392 { "keep", KEEP},
5393 { "label", LABEL},
5394 { "limit", LIMIT},
5395 { "linkshare", LINKSHARE},
5396 { "load", LOAD},
5397 { "log", LOG},
5398 { "loginterface", LOGINTERFACE},
5399 { "max", MAXIMUM},

--- 53 unchanged lines hidden (view full) ---

5453 { "state-defaults", STATEDEFAULTS},
5454 { "state-policy", STATEPOLICY},
5455 { "static-port", STATICPORT},
5456 { "sticky-address", STICKYADDRESS},
5457 { "synproxy", SYNPROXY},
5458 { "table", TABLE},
5459 { "tag", TAG},
5460 { "tagged", TAGGED},
5461 { "target", TARGET},
5398 { "tbrsize", TBRSIZE},
5399 { "timeout", TIMEOUT},
5400 { "to", TO},
5401 { "tos", TOS},
5402 { "ttl", TTL},
5403 { "upperlimit", UPPERLIMIT},
5404 { "urpf-failed", URPFFAILED},
5405 { "user", USER},

--- 704 unchanged lines hidden ---
5462 { "tbrsize", TBRSIZE},
5463 { "timeout", TIMEOUT},
5464 { "to", TO},
5465 { "tos", TOS},
5466 { "ttl", TTL},
5467 { "upperlimit", UPPERLIMIT},
5468 { "urpf-failed", URPFFAILED},
5469 { "user", USER},

--- 704 unchanged lines hidden ---