X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=iprule.h;h=b723bdb05d7dba5be6167883584fa5159c777957;hb=5a68693037a471812831a605cc23186b0eeacbe8;hp=e4ceee078251d6a81d27ce2d6d9e93594988b21b;hpb=dc7ba66de87c2f624e906238e5a74b03da7c3b46;p=project%2Fnetifd.git diff --git a/iprule.h b/iprule.h index e4ceee0..b723bdb 100644 --- a/iprule.h +++ b/iprule.h @@ -17,9 +17,10 @@ #include "interface-ip.h" -#define IPRULE_PRIORITY_ADDR 80000 -#define IPRULE_PRIORITY_NW 90000 -#define IPRULE_PRIORITY_REJECT 2000000000 +#define IPRULE_PRIORITY_ADDR 10000 +#define IPRULE_PRIORITY_ADDR_MASK 20000 +#define IPRULE_PRIORITY_NW 90000 +#define IPRULE_PRIORITY_REJECT 4200000000 enum iprule_flags { /* address family for rule */ @@ -28,22 +29,22 @@ enum iprule_flags { IPRULE_FAMILY = IPRULE_INET4 | IPRULE_INET6, /* rule specifies input device */ - IPRULE_IN = (1 << 2), + IPRULE_IN = (1 << 2), /* rule specifies output device */ - IPRULE_OUT = (1 << 3), + IPRULE_OUT = (1 << 3), /* rule specifies src */ - IPRULE_SRC = (1 << 4), + IPRULE_SRC = (1 << 4), /* rule specifies dest */ - IPRULE_DEST = (1 << 5), + IPRULE_DEST = (1 << 5), /* rule specifies priority */ IPRULE_PRIORITY = (1 << 6), /* rule specifies diffserv/tos */ - IPRULE_TOS = (1 << 7), + IPRULE_TOS = (1 << 7), /* rule specifies fwmark */ IPRULE_FWMARK = (1 << 8), @@ -58,7 +59,10 @@ enum iprule_flags { IPRULE_ACTION = (1 << 11), /* rule is a goto */ - IPRULE_GOTO = (1 << 12), + IPRULE_GOTO = (1 << 12), + + /* rule suppresses results by prefix length */ + IPRULE_SUP_PREFIXLEN = (1 << 13), }; struct iprule { @@ -86,12 +90,13 @@ struct iprule { unsigned int fwmask; unsigned int lookup; + unsigned int sup_prefixlen; unsigned int action; unsigned int gotoid; }; extern struct vlist_tree iprules; -extern const struct config_param_list rule_attr_list; +extern const struct uci_blob_param_list rule_attr_list; void iprule_add(struct blob_attr *attr, bool v6); void iprule_update_start(void);