bgpd, lib, vtysh: Added support for mac filtering in route-maps

1. Added support to create mac filters
2. Enabled route-map commands for EVPN address family
3. Provision to add mac filters under match clause in route-maps

Ticket: CM-16349
Review: CCR-6190
Unit-test: Manual (logs attached to ticket)

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
This commit is contained in:
Mitesh Kanjariya 2017-06-21 01:02:46 -07:00 committed by Donald Sharp
parent ba0fcaf6df
commit d37ba5499e
9 changed files with 605 additions and 416 deletions

View File

@ -1584,6 +1584,7 @@ int subgroup_announce_check(struct bgp_node *rn, struct bgp_info *ri,
info.peer = peer; info.peer = peer;
info.attr = attr; info.attr = attr;
/* don't confuse inbound and outbound setting */ /* don't confuse inbound and outbound setting */
RESET_FLAG(attr->rmap_change_flags); RESET_FLAG(attr->rmap_change_flags);

View File

@ -54,6 +54,8 @@
#include "bgpd/bgp_lcommunity.h" #include "bgpd/bgp_lcommunity.h"
#include "bgpd/bgp_vty.h" #include "bgpd/bgp_vty.h"
#include "bgpd/bgp_debug.h" #include "bgpd/bgp_debug.h"
#include "bgpd/bgp_evpn.h"
#include "bgpd/bgp_evpn_private.h"
#if ENABLE_BGP_VNC #if ENABLE_BGP_VNC
#include "bgpd/rfapi/bgp_rfapi_cfg.h" #include "bgpd/rfapi/bgp_rfapi_cfg.h"
@ -572,6 +574,52 @@ struct route_map_rule_cmd route_match_ip_route_source_prefix_list_cmd = {
route_match_ip_route_source_prefix_list_compile, route_match_ip_route_source_prefix_list_compile,
route_match_ip_route_source_prefix_list_free}; route_match_ip_route_source_prefix_list_free};
/* `match mac address MAC_ACCESS_LIST' */
/* Match function should return 1 if match is success else return
zero. */
static route_map_result_t route_match_mac_address(void *rule,
struct prefix *prefix,
route_map_object_t type,
void *object)
{
struct access_list *alist;
if (type == RMAP_BGP) {
alist = access_list_lookup(AFI_L2VPN, (char *)rule);
if (alist == NULL)
return RMAP_NOMATCH;
if (prefix->u.prefix_evpn.route_type != BGP_EVPN_MAC_IP_ROUTE)
return RMAP_NOMATCH;
return (access_list_apply(alist, &(prefix->u.prefix_evpn.mac))
== FILTER_DENY
? RMAP_NOMATCH
: RMAP_MATCH);
}
return RMAP_NOMATCH;
}
/* Route map `mac address' match statement. `arg' should be
access-list name. */
static void *route_match_mac_address_compile(const char *arg)
{
return XSTRDUP(MTYPE_ROUTE_MAP_COMPILED, arg);
}
/* Free route map's compiled `ip address' value. */
static void route_match_mac_address_free(void *rule)
{
XFREE(MTYPE_ROUTE_MAP_COMPILED, rule);
}
/* Route map commands for mac address matching. */
struct route_map_rule_cmd route_match_mac_address_cmd = {
"mac address", route_match_mac_address, route_match_mac_address_compile,
route_match_mac_address_free};
/* `match local-preference LOCAL-PREF' */ /* `match local-preference LOCAL-PREF' */
/* Match function return 1 if match is success else return zero. */ /* Match function return 1 if match is success else return zero. */
@ -2994,6 +3042,33 @@ static void bgp_route_map_event(route_map_event_t event, const char *rmap_name)
route_map_notify_dependencies(rmap_name, RMAP_EVENT_MATCH_ADDED); route_map_notify_dependencies(rmap_name, RMAP_EVENT_MATCH_ADDED);
} }
DEFUN (match_mac_address,
match_mac_address_cmd,
"match mac address WORD",
MATCH_STR
"mac address\n"
"Match address of route\n"
"MAC Access-list name\n")
{
return bgp_route_match_add(vty, "mac address", argv[3]->arg,
RMAP_EVENT_FILTER_ADDED);
}
DEFUN (no_match_mac_address,
no_match_mac_address_cmd,
"no match mac address",
NO_STR
MATCH_STR
"mac\n"
"Match address of route\n")
{
if (argc == 0)
return bgp_route_match_delete(vty, "mac address", NULL,
RMAP_EVENT_FILTER_DELETED);
return bgp_route_match_delete(vty, "mac address", argv[4]->arg,
RMAP_EVENT_FILTER_DELETED);
}
DEFUN (match_peer, DEFUN (match_peer,
match_peer_cmd, match_peer_cmd,
@ -4351,6 +4426,7 @@ void bgp_route_map_init(void)
route_map_install_match(&route_match_probability_cmd); route_map_install_match(&route_match_probability_cmd);
route_map_install_match(&route_match_interface_cmd); route_map_install_match(&route_match_interface_cmd);
route_map_install_match(&route_match_tag_cmd); route_map_install_match(&route_match_tag_cmd);
route_map_install_match(&route_match_mac_address_cmd);
route_map_install_set(&route_set_ip_nexthop_cmd); route_map_install_set(&route_set_ip_nexthop_cmd);
route_map_install_set(&route_set_local_pref_cmd); route_map_install_set(&route_set_local_pref_cmd);
@ -4381,6 +4457,8 @@ void bgp_route_map_init(void)
install_element(RMAP_NODE, &no_match_ip_route_source_cmd); install_element(RMAP_NODE, &no_match_ip_route_source_cmd);
install_element(RMAP_NODE, &match_ip_route_source_prefix_list_cmd); install_element(RMAP_NODE, &match_ip_route_source_prefix_list_cmd);
install_element(RMAP_NODE, &no_match_ip_route_source_prefix_list_cmd); install_element(RMAP_NODE, &no_match_ip_route_source_prefix_list_cmd);
install_element(RMAP_NODE, &match_mac_address_cmd);
install_element(RMAP_NODE, &no_match_mac_address_cmd);
install_element(RMAP_NODE, &match_aspath_cmd); install_element(RMAP_NODE, &match_aspath_cmd);
install_element(RMAP_NODE, &no_match_aspath_cmd); install_element(RMAP_NODE, &no_match_aspath_cmd);

View File

@ -12047,6 +12047,8 @@ void bgp_vty_init(void)
install_element(BGP_VPNV4_NODE, &no_neighbor_route_map_cmd); install_element(BGP_VPNV4_NODE, &no_neighbor_route_map_cmd);
install_element(BGP_VPNV6_NODE, &neighbor_route_map_cmd); install_element(BGP_VPNV6_NODE, &neighbor_route_map_cmd);
install_element(BGP_VPNV6_NODE, &no_neighbor_route_map_cmd); install_element(BGP_VPNV6_NODE, &no_neighbor_route_map_cmd);
install_element(BGP_EVPN_NODE, &neighbor_route_map_cmd);
install_element(BGP_EVPN_NODE, &no_neighbor_route_map_cmd);
/* "neighbor unsuppress-map" commands. */ /* "neighbor unsuppress-map" commands. */
install_element(BGP_NODE, &neighbor_unsuppress_map_hidden_cmd); install_element(BGP_NODE, &neighbor_unsuppress_map_hidden_cmd);

View File

@ -101,6 +101,7 @@ const char *node_names[] = {
"ipv4 access list", // ACCESS_NODE, "ipv4 access list", // ACCESS_NODE,
"ipv4 prefix list", // PREFIX_NODE, "ipv4 prefix list", // PREFIX_NODE,
"ipv6 access list", // ACCESS_IPV6_NODE, "ipv6 access list", // ACCESS_IPV6_NODE,
"MAC access list", // ACCESS_MAC_NODE,
"ipv6 prefix list", // PREFIX_IPV6_NODE, "ipv6 prefix list", // PREFIX_IPV6_NODE,
"as list", // AS_LIST_NODE, "as list", // AS_LIST_NODE,
"community list", // COMMUNITY_LIST_NODE, "community list", // COMMUNITY_LIST_NODE,

View File

@ -123,6 +123,7 @@ enum node_type {
ACCESS_NODE, /* Access list node. */ ACCESS_NODE, /* Access list node. */
PREFIX_NODE, /* Prefix list node. */ PREFIX_NODE, /* Prefix list node. */
ACCESS_IPV6_NODE, /* Access list node. */ ACCESS_IPV6_NODE, /* Access list node. */
ACCESS_MAC_NODE, /* MAC access list node*/
PREFIX_IPV6_NODE, /* Prefix list node. */ PREFIX_IPV6_NODE, /* Prefix list node. */
AS_LIST_NODE, /* AS list node. */ AS_LIST_NODE, /* AS list node. */
COMMUNITY_LIST_NODE, /* Community list node. */ COMMUNITY_LIST_NODE, /* Community list node. */

View File

@ -90,6 +90,14 @@ struct access_master {
void (*delete_hook)(struct access_list *); void (*delete_hook)(struct access_list *);
}; };
/* Static structure for IPv4 access_list's master. */
static struct access_master access_master_mac = {
{NULL, NULL},
{NULL, NULL},
NULL,
NULL,
};
/* Static structure for IPv4 access_list's master. */ /* Static structure for IPv4 access_list's master. */
static struct access_master access_master_ipv4 = { static struct access_master access_master_ipv4 = {
{NULL, NULL}, {NULL, NULL},
@ -112,6 +120,8 @@ static struct access_master *access_master_get(afi_t afi)
return &access_master_ipv4; return &access_master_ipv4;
else if (afi == AFI_IP6) else if (afi == AFI_IP6)
return &access_master_ipv6; return &access_master_ipv6;
else if (afi == AFI_L2VPN)
return &access_master_mac;
return NULL; return NULL;
} }
@ -146,6 +156,25 @@ static const char *filter_type_str(struct filter *filter)
} }
} }
/*
* mac filter match
* n is of type struct prefix_eth
* p can be of type struct ethaddr
*/
static int mac_filter_match(struct prefix *n, struct ethaddr *p)
{
if (!n && !p)
return 1;
if (!n || !p)
return 0;
if (memcmp(&(n->u.prefix), p, sizeof(struct ethaddr)) == 0)
return 1;
return 0;
}
/* If filter match to the prefix then return 1. */ /* If filter match to the prefix then return 1. */
static int filter_match_cisco(struct filter *mfilter, struct prefix *p) static int filter_match_cisco(struct filter *mfilter, struct prefix *p)
{ {
@ -171,22 +200,37 @@ static int filter_match_cisco(struct filter *mfilter, struct prefix *p)
} }
/* If filter match to the prefix then return 1. */ /* If filter match to the prefix then return 1. */
static int filter_match_zebra(struct filter *mfilter, struct prefix *p) static int filter_match_zebra(struct filter *mfilter, void *obj)
{ {
struct filter_zebra *filter; struct filter_zebra *filter = NULL;
filter = &mfilter->u.zfilter; filter = &mfilter->u.zfilter;
if (filter->prefix.family == p->family) { if (filter->prefix.family == AF_ETHERNET) {
if (filter->exact) { struct ethaddr *p = NULL;
if (filter->prefix.prefixlen == p->prefixlen)
p = (struct ethaddr *)obj;
return mac_filter_match(&filter->prefix, p);
}
if (filter->prefix.family == AF_INET
|| filter->prefix.family == AF_INET6) {
struct prefix *p = NULL;
p = (struct prefix *)obj;
if (filter->prefix.family == p->family) {
if (filter->exact) {
if (filter->prefix.prefixlen == p->prefixlen)
return prefix_match(&filter->prefix, p);
else
return 0;
} else
return prefix_match(&filter->prefix, p); return prefix_match(&filter->prefix, p);
else
return 0;
} else } else
return prefix_match(&filter->prefix, p); return 0;
} else }
return 0;
return 0;
} }
/* Allocate new access list structure. */ /* Allocate new access list structure. */
@ -377,7 +421,7 @@ enum filter_type access_list_apply(struct access_list *access, void *object)
if (filter_match_cisco(filter, p)) if (filter_match_cisco(filter, p))
return filter->type; return filter->type;
} else { } else {
if (filter_match_zebra(filter, p)) if (filter_match_zebra(filter, object))
return filter->type; return filter->type;
} }
} }
@ -390,6 +434,7 @@ void access_list_add_hook(void (*func)(struct access_list *access))
{ {
access_master_ipv4.add_hook = func; access_master_ipv4.add_hook = func;
access_master_ipv6.add_hook = func; access_master_ipv6.add_hook = func;
access_master_mac.add_hook = func;
} }
/* Delete hook function. */ /* Delete hook function. */
@ -397,6 +442,7 @@ void access_list_delete_hook(void (*func)(struct access_list *access))
{ {
access_master_ipv4.delete_hook = func; access_master_ipv4.delete_hook = func;
access_master_ipv6.delete_hook = func; access_master_ipv6.delete_hook = func;
access_master_mac.delete_hook = func;
} }
/* Add new filter to the end of specified access_list. */ /* Add new filter to the end of specified access_list. */
@ -515,10 +561,18 @@ static struct filter *filter_lookup_zebra(struct access_list *access,
filter = &mfilter->u.zfilter; filter = &mfilter->u.zfilter;
if (filter->exact == new->exact if (filter->exact == new->exact
&& mfilter->type && mfilter->type == mnew->type) {
== mnew->type &&prefix_same(&filter->prefix, if (new->prefix.family == AF_ETHERNET) {
&new->prefix)) if (prefix_eth_same(
return mfilter; (struct prefix_eth *)&filter
->prefix,
(struct prefix_eth *)&new->prefix))
return mfilter;
} else {
if (prefix_same(&filter->prefix, &new->prefix))
return mfilter;
}
}
} }
return NULL; return NULL;
} }
@ -1252,6 +1306,12 @@ static int filter_set_zebra(struct vty *vty, const char *name_str,
"IPv6 address prefix/prefixlen is malformed\n"); "IPv6 address prefix/prefixlen is malformed\n");
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
} }
} else if (afi == AFI_L2VPN) {
ret = str2prefix_eth(prefix_str, (struct prefix_eth *)&p);
if (ret <= 0) {
vty_out(vty, "MAC address is malformed\n");
return CMD_WARNING;
}
} else } else
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
@ -1274,7 +1334,6 @@ static int filter_set_zebra(struct vty *vty, const char *name_str,
access_list_filter_add(access, mfilter); access_list_filter_add(access, mfilter);
} else { } else {
struct filter *delete_filter; struct filter *delete_filter;
delete_filter = filter_lookup_zebra(access, mfilter); delete_filter = filter_lookup_zebra(access, mfilter);
if (delete_filter) if (delete_filter)
access_list_filter_delete(access, delete_filter); access_list_filter_delete(access, delete_filter);
@ -1285,6 +1344,64 @@ static int filter_set_zebra(struct vty *vty, const char *name_str,
return CMD_SUCCESS; return CMD_SUCCESS;
} }
DEFUN (mac_access_list,
mac_access_list_cmd,
"mac access-list WORD <deny|permit> MAC",
"Add a mac access-list\n"
"Add an access list entry\n"
"MAC zebra access-list name\n"
"Specify packets to reject\n"
"Specify packets to forward\n"
"MAC address to match. e.g. 00:01:00:01:00:01\n")
{
return filter_set_zebra(vty, argv[2]->arg, argv[3]->arg, AFI_L2VPN,
argv[4]->arg, 0, 1);
}
DEFUN (no_mac_access_list,
no_mac_access_list_cmd,
"no mac access-list WORD <deny|permit> MAC",
NO_STR
"Remove a mac access-list\n"
"Remove an access list entry\n"
"MAC zebra access-list name\n"
"Specify packets to reject\n"
"Specify packets to forward\n"
"MAC address to match. e.g. 00:01:00:01:00:01\n")
{
return filter_set_zebra(vty, argv[3]->arg, argv[4]->arg, AFI_L2VPN,
argv[5]->arg, 0, 0);
}
DEFUN (mac_access_list_any,
mac_access_list_any_cmd,
"mac access-list WORD <deny|permit> any",
"Add a mac access-list\n"
"Add an access list entry\n"
"MAC zebra access-list name\n"
"Specify packets to reject\n"
"Specify packets to forward\n"
"MAC address to match. e.g. 00:01:00:01:00:01\n")
{
return filter_set_zebra(vty, argv[2]->arg, argv[3]->arg, AFI_L2VPN,
"00:00:00:00:00:00", 0, 1);
}
DEFUN (no_mac_access_list_any,
no_mac_access_list_any_cmd,
"no mac access-list WORD <deny|permit> any",
NO_STR
"Remove a mac access-list\n"
"Remove an access list entry\n"
"MAC zebra access-list name\n"
"Specify packets to reject\n"
"Specify packets to forward\n"
"MAC address to match. e.g. 00:01:00:01:00:01\n")
{
return filter_set_zebra(vty, argv[2]->arg, argv[3]->arg, AFI_L2VPN,
"00:00:00:00:00:00", 0, 0);
}
DEFUN (access_list_exact, DEFUN (access_list_exact,
access_list_exact_cmd, access_list_exact_cmd,
"access-list WORD <deny|permit> A.B.C.D/M [exact-match]", "access-list WORD <deny|permit> A.B.C.D/M [exact-match]",
@ -1666,12 +1783,15 @@ static int filter_show(struct vty *vty, const char *name, afi_t afi)
filter = &mfilter->u.cfilter; filter = &mfilter->u.cfilter;
if (write) { if (write) {
vty_out(vty, "%s IP%s access list %s\n", vty_out(vty, "%s %s access list %s\n",
mfilter->cisco ? (filter->extended mfilter->cisco ? (filter->extended
? "Extended" ? "Extended"
: "Standard") : "Standard")
: "Zebra", : "Zebra",
afi == AFI_IP6 ? "v6" : "", (afi == AFI_IP)
? ("")
: ((afi == AFI_IP6) ? ("ipv6 ")
: ("mac ")),
access->name); access->name);
write = 0; write = 0;
} }
@ -1710,12 +1830,15 @@ static int filter_show(struct vty *vty, const char *name, afi_t afi)
filter = &mfilter->u.cfilter; filter = &mfilter->u.cfilter;
if (write) { if (write) {
vty_out(vty, "%s IP%s access list %s\n", vty_out(vty, "%s %s access list %s\n",
mfilter->cisco ? (filter->extended mfilter->cisco ? (filter->extended
? "Extended" ? "Extended"
: "Standard") : "Standard")
: "Zebra", : "Zebra",
afi == AFI_IP6 ? "v6" : "", (afi == AFI_IP)
? ("")
: ((afi == AFI_IP6) ? ("ipv6 ")
: ("mac ")),
access->name); access->name);
write = 0; write = 0;
} }
@ -1746,6 +1869,29 @@ static int filter_show(struct vty *vty, const char *name, afi_t afi)
return CMD_SUCCESS; return CMD_SUCCESS;
} }
/* show MAC access list - this only has MAC filters for now*/
DEFUN (show_mac_access_list,
show_mac_access_list_cmd,
"show mac access-list",
SHOW_STR
"mac access lists\n"
"List mac access lists\n")
{
return filter_show(vty, NULL, AFI_L2VPN);
}
DEFUN (show_mac_access_list_name,
show_mac_access_list_name_cmd,
"show mac access-list WORD",
SHOW_STR
"mac\n"
"List mac access lists\n"
"mac zebra access-list\n"
"mac address")
{
return filter_show(vty, argv[3]->arg, AFI_L2VPN);
}
DEFUN (show_ip_access_list, DEFUN (show_ip_access_list,
show_ip_access_list_cmd, show_ip_access_list_cmd,
"show ip access-list", "show ip access-list",
@ -1844,10 +1990,13 @@ void config_write_access_zebra(struct vty *vty, struct filter *mfilter)
if (p->prefixlen == 0 && !filter->exact) if (p->prefixlen == 0 && !filter->exact)
vty_out(vty, " any"); vty_out(vty, " any");
else else if (p->family == AF_INET6 || p->family == AF_INET)
vty_out(vty, " %s/%d%s", vty_out(vty, " %s/%d%s",
inet_ntop(p->family, &p->u.prefix, buf, BUFSIZ), inet_ntop(p->family, &p->u.prefix, buf, BUFSIZ),
p->prefixlen, filter->exact ? " exact-match" : ""); p->prefixlen, filter->exact ? " exact-match" : "");
else
vty_out(vty, " %s",
prefix_mac2str(&(p->u.prefix_eth), buf, sizeof(buf)));
vty_out(vty, "\n"); vty_out(vty, "\n");
} }
@ -1866,15 +2015,19 @@ static int config_write_access(struct vty *vty, afi_t afi)
for (access = master->num.head; access; access = access->next) { for (access = master->num.head; access; access = access->next) {
if (access->remark) { if (access->remark) {
vty_out(vty, "%saccess-list %s remark %s\n", vty_out(vty, "%saccess-list %s remark %s\n",
afi == AFI_IP ? "" : "ipv6 ", access->name, (afi == AFI_IP) ? ("")
access->remark); : ((afi == AFI_IP6) ? ("ipv6 ")
: ("mac ")),
access->name, access->remark);
write++; write++;
} }
for (mfilter = access->head; mfilter; mfilter = mfilter->next) { for (mfilter = access->head; mfilter; mfilter = mfilter->next) {
vty_out(vty, "%saccess-list %s %s", vty_out(vty, "%saccess-list %s %s",
afi == AFI_IP ? "" : "ipv6 ", access->name, (afi == AFI_IP) ? ("")
filter_type_str(mfilter)); : ((afi == AFI_IP6) ? ("ipv6 ")
: ("mac ")),
access->name, filter_type_str(mfilter));
if (mfilter->cisco) if (mfilter->cisco)
config_write_access_cisco(vty, mfilter); config_write_access_cisco(vty, mfilter);
@ -1888,15 +2041,19 @@ static int config_write_access(struct vty *vty, afi_t afi)
for (access = master->str.head; access; access = access->next) { for (access = master->str.head; access; access = access->next) {
if (access->remark) { if (access->remark) {
vty_out(vty, "%saccess-list %s remark %s\n", vty_out(vty, "%saccess-list %s remark %s\n",
afi == AFI_IP ? "" : "ipv6 ", access->name, (afi == AFI_IP) ? ("")
access->remark); : ((afi == AFI_IP6) ? ("ipv6 ")
: ("mac ")),
access->name, access->remark);
write++; write++;
} }
for (mfilter = access->head; mfilter; mfilter = mfilter->next) { for (mfilter = access->head; mfilter; mfilter = mfilter->next) {
vty_out(vty, "%saccess-list %s %s", vty_out(vty, "%saccess-list %s %s",
afi == AFI_IP ? "" : "ipv6 ", access->name, (afi == AFI_IP) ? ("")
filter_type_str(mfilter)); : ((afi == AFI_IP6) ? ("ipv6 ")
: ("mac ")),
access->name, filter_type_str(mfilter));
if (mfilter->cisco) if (mfilter->cisco)
config_write_access_cisco(vty, mfilter); config_write_access_cisco(vty, mfilter);
@ -1909,6 +2066,56 @@ static int config_write_access(struct vty *vty, afi_t afi)
return write; return write;
} }
static struct cmd_node access_mac_node = {
ACCESS_MAC_NODE, "", /* Access list has no interface. */
1};
static int config_write_access_mac(struct vty *vty)
{
return config_write_access(vty, AFI_L2VPN);
}
static void access_list_reset_mac(void)
{
struct access_list *access;
struct access_list *next;
struct access_master *master;
master = access_master_get(AFI_L2VPN);
if (master == NULL)
return;
for (access = master->num.head; access; access = next) {
next = access->next;
access_list_delete(access);
}
for (access = master->str.head; access; access = next) {
next = access->next;
access_list_delete(access);
}
assert(master->num.head == NULL);
assert(master->num.tail == NULL);
assert(master->str.head == NULL);
assert(master->str.tail == NULL);
}
/* Install vty related command. */
static void access_list_init_mac(void)
{
install_node(&access_mac_node, config_write_access_mac);
install_element(ENABLE_NODE, &show_mac_access_list_cmd);
install_element(ENABLE_NODE, &show_mac_access_list_name_cmd);
/* Zebra access-list */
install_element(CONFIG_NODE, &mac_access_list_cmd);
install_element(CONFIG_NODE, &no_mac_access_list_cmd);
install_element(CONFIG_NODE, &mac_access_list_any_cmd);
install_element(CONFIG_NODE, &no_mac_access_list_any_cmd);
}
/* Access-list node. */ /* Access-list node. */
static struct cmd_node access_node = {ACCESS_NODE, static struct cmd_node access_node = {ACCESS_NODE,
"", /* Access list has no interface. */ "", /* Access list has no interface. */
@ -2050,10 +2257,12 @@ void access_list_init()
{ {
access_list_init_ipv4(); access_list_init_ipv4();
access_list_init_ipv6(); access_list_init_ipv6();
access_list_init_mac();
} }
void access_list_reset() void access_list_reset()
{ {
access_list_reset_ipv4(); access_list_reset_ipv4();
access_list_reset_ipv6(); access_list_reset_ipv6();
access_list_reset_mac();
} }

View File

@ -37,390 +37,262 @@ static const u_char maskbit[] = {0x00, 0x80, 0xc0, 0xe0, 0xf0,
static const struct in6_addr maskbytes6[] = { static const struct in6_addr maskbytes6[] = {
/* /0 */ {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /0 */ {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /1 */ /* /1 */ {{{0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
{{{0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /2 */ {{{0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* /2 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /3 */ {{{0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /3 */ /* /4 */ {{{0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
{{{0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /5 */ {{{0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* /4 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /6 */ {{{0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /5 */ /* /7 */ {{{0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
{{{0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /8 */ {{{0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* /6 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /9 */ {{{0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /7 */ /* /10 */ {{{0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
{{{0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /11 */ {{{0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* /8 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /12 */ {{{0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /9 */ /* /13 */ {{{0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
{{{0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /14 */ {{{0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* /10 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /15 */ {{{0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /11 */ /* /16 */ {{{0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
{{{0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /17 */ {{{0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* /12 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /18 */ {{{0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /13 */ /* /19 */ {{{0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
{{{0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /20 */ {{{0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* /14 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /21 */ {{{0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /15 */ /* /22 */ {{{0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
{{{0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /23 */ {{{0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* /16 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /24 */ {{{0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /17 */ /* /25 */ {{{0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
{{{0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /26 */ {{{0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
/* /18 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /27 */ {{{0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /19 */ /* /28 */ {{{0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
{{{0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /29 */ {{{0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
/* /20 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /30 */ {{{0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /21 */ /* /31 */ {{{0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00,
{{{0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /32 */ {{{0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
/* /22 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /33 */ {{{0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /23 */ /* /34 */ {{{0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00,
{{{0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /35 */ {{{0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00,
/* /24 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /36 */ {{{0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /25 */ /* /37 */ {{{0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00,
{{{0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /38 */ {{{0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00,
/* /26 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /39 */ {{{0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /27 */ /* /40 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
{{{0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /41 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00,
/* /28 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /42 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /29 */ /* /43 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00,
{{{0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /44 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00,
/* /30 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /45 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /31 */ /* /46 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00,
{{{0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /47 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00,
/* /32 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /48 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /33 */ /* /49 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00,
{{{0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /50 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
/* /34 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /51 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /35 */ /* /52 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00,
{{{0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /53 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00,
/* /36 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /54 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /37 */ /* /55 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00,
{{{0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /56 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
/* /38 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /57 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /39 */ /* /58 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00,
{{{0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /59 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00,
/* /40 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* /60 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /41 */ /* /61 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /62 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00,
/* /42 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, /* /63 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /43 */ /* /64 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /65 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
/* /44 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, /* /66 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /45 */ /* /67 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /68 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
/* /46 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, /* /69 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /47 */ /* /70 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /71 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
/* /48 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, /* /72 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /49 */ /* /73 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /74 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /50 */ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, /* /75 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /51 */ /* /76 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /77 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /52 */ 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, /* /78 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /53 */ /* /79 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /80 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /54 */ 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, /* /81 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /55 */ /* /82 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /83 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /56 */ 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* /84 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /57 */ /* /85 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /86 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /58 */ 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, /* /87 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /59 */ /* /88 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /89 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /60 */ 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, /* /90 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00}}},
/* /61 */ /* /91 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /92 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /62 */ 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, /* /93 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00}}},
/* /63 */ /* /94 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /95 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /64 */ 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, /* /96 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00}}},
/* /65 */ /* /97 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /98 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /66 */ 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, /* /99 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00}}},
/* /67 */ /* /100 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /101 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /68 */ 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, /* /102 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00}}},
/* /69 */ /* /103 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /104 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /70 */ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, /* /105 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00}}},
/* /71 */ /* /106 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /107 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /72 */ 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, /* /108 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00}}},
/* /73 */ /* /109 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /110 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /74 */ 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, /* /111 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00}}},
/* /75 */ /* /112 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /113 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /76 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, /* /114 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00}}},
/* /77 */ /* /115 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /116 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /78 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, /* /117 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00}}},
/* /79 */ /* /118 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /119 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /80 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, /* /120 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00}}},
/* /81 */ /* /121 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /122 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /82 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, /* /123 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0}}},
/* /83 */ /* /124 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /125 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /84 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8}}},
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, /* /126 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}}, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc}}},
/* /85 */ /* /127 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe}}},
0x00, 0x00, 0x00, 0x00, 0x00}}}, /* /128 */ {{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/* /86 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}}}};
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc,
0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /87 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /88 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00}}},
/* /89 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x80, 0x00, 0x00, 0x00, 0x00}}},
/* /90 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xc0, 0x00, 0x00, 0x00, 0x00}}},
/* /91 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xe0, 0x00, 0x00, 0x00, 0x00}}},
/* /92 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xf0, 0x00, 0x00, 0x00, 0x00}}},
/* /93 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xf8, 0x00, 0x00, 0x00, 0x00}}},
/* /94 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xfc, 0x00, 0x00, 0x00, 0x00}}},
/* /95 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xfe, 0x00, 0x00, 0x00, 0x00}}},
/* /96 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00}}},
/* /97 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x80, 0x00, 0x00, 0x00}}},
/* /98 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xc0, 0x00, 0x00, 0x00}}},
/* /99 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xe0, 0x00, 0x00, 0x00}}},
/* /100 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xf0, 0x00, 0x00, 0x00}}},
/* /101 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xf8, 0x00, 0x00, 0x00}}},
/* /102 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfc, 0x00, 0x00, 0x00}}},
/* /103 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfe, 0x00, 0x00, 0x00}}},
/* /104 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0x00, 0x00, 0x00}}},
/* /105 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0x80, 0x00, 0x00}}},
/* /106 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xc0, 0x00, 0x00}}},
/* /107 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xe0, 0x00, 0x00}}},
/* /108 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xf0, 0x00, 0x00}}},
/* /109 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xf8, 0x00, 0x00}}},
/* /110 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xfc, 0x00, 0x00}}},
/* /111 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xfe, 0x00, 0x00}}},
/* /112 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x00, 0x00}}},
/* /113 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x80, 0x00}}},
/* /114 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xc0, 0x00}}},
/* /115 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xe0, 0x00}}},
/* /116 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xf0, 0x00}}},
/* /117 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xf8, 0x00}}},
/* /118 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xfc, 0x00}}},
/* /119 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xfe, 0x00}}},
/* /120 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x00}}},
/* /121 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x80}}},
/* /122 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xc0}}},
/* /123 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xe0}}},
/* /124 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xf0}}},
/* /125 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xf8}}},
/* /126 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xfc}}},
/* /127 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xfe}}},
/* /128 */
{{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff}}}};
/* Number of bits in prefix type. */ /* Number of bits in prefix type. */
#ifndef PNBBY #ifndef PNBBY
@ -589,6 +461,24 @@ void prefix_copy(struct prefix *dest, const struct prefix *src)
} }
} }
/* check if the two prefix_eth struct are same*/
int prefix_eth_same(struct prefix_eth *p1, struct prefix_eth *p2)
{
if (!p1 && !p2)
return 1;
if (p1 && !p2)
return 0;
if (!p1 && p2)
return 0;
if (memcmp(p1, p2, sizeof(struct prefix_eth)) == 0)
return 1;
return 0;
}
/* /*
* Return 1 if the address/netmask contained in the prefix structure * Return 1 if the address/netmask contained in the prefix structure
* is the same, and else return 0. For this routine, 'same' requires * is the same, and else return 0. For this routine, 'same' requires

View File

@ -293,6 +293,7 @@ extern int prefix_cmp(const struct prefix *, const struct prefix *);
extern int prefix_common_bits(const struct prefix *, const struct prefix *); extern int prefix_common_bits(const struct prefix *, const struct prefix *);
extern void prefix_copy(struct prefix *dest, const struct prefix *src); extern void prefix_copy(struct prefix *dest, const struct prefix *src);
extern void apply_mask(struct prefix *); extern void apply_mask(struct prefix *);
extern int prefix_eth_same(struct prefix_eth *p1, struct prefix_eth *p2);
extern struct prefix *sockunion2prefix(const union sockunion *dest, extern struct prefix *sockunion2prefix(const union sockunion *dest,
const union sockunion *mask); const union sockunion *mask);
@ -356,6 +357,7 @@ static inline int ipv6_martian(struct in6_addr *addr)
} }
extern int all_digit(const char *); extern int all_digit(const char *);
extern int macstr2prefix_evpn(const char *str, struct prefix_evpn *p);
/* NOTE: This routine expects the address argument in network byte order. */ /* NOTE: This routine expects the address argument in network byte order. */
static inline int ipv4_martian(struct in_addr *addr) static inline int ipv4_martian(struct in_addr *addr)

View File

@ -222,6 +222,10 @@ void vtysh_config_parse_line(void *arg, const char *line)
strlen("ipv6 access-list")) strlen("ipv6 access-list"))
== 0) == 0)
config = config_get(ACCESS_IPV6_NODE, line); config = config_get(ACCESS_IPV6_NODE, line);
else if (strncmp(line, "mac access-list",
strlen("mac access-list"))
== 0)
config = config_get(ACCESS_MAC_NODE, line);
else if (strncmp(line, "ip prefix-list", else if (strncmp(line, "ip prefix-list",
strlen("ip prefix-list")) strlen("ip prefix-list"))
== 0) == 0)
@ -300,9 +304,10 @@ void vtysh_config_parse_line(void *arg, const char *line)
#define NO_DELIMITER(I) \ #define NO_DELIMITER(I) \
((I) == ACCESS_NODE || (I) == PREFIX_NODE || (I) == IP_NODE \ ((I) == ACCESS_NODE || (I) == PREFIX_NODE || (I) == IP_NODE \
|| (I) == AS_LIST_NODE || (I) == COMMUNITY_LIST_NODE \ || (I) == AS_LIST_NODE || (I) == COMMUNITY_LIST_NODE \
|| (I) == ACCESS_IPV6_NODE || (I) == PREFIX_IPV6_NODE \ || (I) == ACCESS_IPV6_NODE || (I) == ACCESS_MAC_NODE \
|| (I) == SERVICE_NODE || (I) == FORWARDING_NODE || (I) == DEBUG_NODE \ || (I) == PREFIX_IPV6_NODE || (I) == SERVICE_NODE \
|| (I) == AAA_NODE || (I) == VRF_DEBUG_NODE || (I) == MPLS_NODE) || (I) == FORWARDING_NODE || (I) == DEBUG_NODE || (I) == AAA_NODE \
|| (I) == VRF_DEBUG_NODE || (I) == MPLS_NODE)
/* Display configuration to file pointer. */ /* Display configuration to file pointer. */
void vtysh_config_dump(FILE *fp) void vtysh_config_dump(FILE *fp)