diff options
author | Maria Matejka <mq@ucw.cz> | 2022-05-31 12:51:34 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-31 12:51:34 +0200 |
commit | ea109ce3e3474dd10d7592c44d2371b794f5c867 (patch) | |
tree | bfd5e54e1fa8f50efd5456a54dc1ebf508c1804c /lib | |
parent | 1493695c6ba2b169523f7c2097fac8e8343352fe (diff) | |
parent | 4fe9881d625f10e44109a649e369a413bd98de71 (diff) |
Merge commit '4fe9881d625f10e44109a649e369a413bd98de71' into haugesund
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ip.h | 2 | ||||
-rw-r--r-- | lib/route.h | 7 | ||||
-rw-r--r-- | lib/type.h | 1 |
3 files changed, 4 insertions, 6 deletions
@@ -362,7 +362,7 @@ static inline ip6_addr ip6_hton(ip6_addr a) static inline ip6_addr ip6_ntoh(ip6_addr a) { return _MI6(ntohl(_I0(a)), ntohl(_I1(a)), ntohl(_I2(a)), ntohl(_I3(a))); } -#define MPLS_MAX_LABEL_STACK 8 +#define MPLS_MAX_LABEL_STACK 16 static inline int mpls_get(const char *buf, int buflen, u32 *stack) diff --git a/lib/route.h b/lib/route.h index 1ade1a81..613df0c3 100644 --- a/lib/route.h +++ b/lib/route.h @@ -89,7 +89,6 @@ typedef struct rta { u32 uc; /* Use count */ u32 hash_key; /* Hash over important fields */ struct ea_list *eattrs; /* Extended Attribute chain */ - struct hostentry *hostentry; /* Hostentry for recursive next-hops */ u16 cached:1; /* Are attributes cached? */ u16 dest:4; /* Route destination type (RTD_...) */ } rta; @@ -174,6 +173,8 @@ struct ea_class { uint readonly:1; /* This attribute can't be changed by filters */ \ uint conf:1; /* Requested by config */ \ void (*format)(const eattr *ea, byte *buf, uint size); \ + void (*stored)(const eattr *ea); /* When stored into global hash */ \ + void (*freed)(const eattr *ea); /* When released from global hash */ \ EA_CLASS_INSIDE; }; @@ -332,10 +333,6 @@ extern struct ea_class ea_gen_source; static inline u32 rt_get_source_attr(const rte *rt) { return ea_get_int(rt->attrs->eattrs, &ea_gen_source, 0); } -/* MPLS labels: Use with a recursive nexthop specification - * to add additional labels to the resolved nexthop */ -extern struct ea_class ea_mpls_labels; - /* Next hop: For now, stored as adata */ extern struct ea_class ea_gen_nexthop; @@ -53,6 +53,7 @@ enum btype { T_OPAQUE = 0x02, /* Opaque byte string (not filterable) */ T_IFACE = 0x0c, /* Pointer to an interface (inside adata) */ T_NEXTHOP_LIST = 0x2c, /* The whole nexthop block */ + T_HOSTENTRY = 0x2e, /* Hostentry with possible MPLS labels */ /* Types shared with eattrs */ T_INT = 0x01, /* 32-bit unsigned integer number */ |