vrf_id_t redirect_vrf;
struct _pbr_redirect_ip {
struct in_addr redirect_ip_v4;
+ struct in6_addr redirect_ip_v6;
uint8_t duplicate;
} zr;
uint8_t marking_dscp;
uint8_t match_dscp_num;
uint8_t match_tcpflags_num;
uint8_t match_fragment_num;
+ uint8_t match_flowlabel_num;
struct prefix src_prefix;
struct prefix dst_prefix;
+ uint8_t src_prefix_offset;
+ uint8_t dst_prefix_offset;
#define PROTOCOL_UDP 17
#define PROTOCOL_TCP 6
#define PROTOCOL_ICMP 1
+#define PROTOCOL_ICMPV6 58
struct bgp_pbr_match_val protocol[BGP_PBR_MATCH_VAL_MAX];
struct bgp_pbr_match_val src_port[BGP_PBR_MATCH_VAL_MAX];
struct bgp_pbr_match_val dst_port[BGP_PBR_MATCH_VAL_MAX];
struct bgp_pbr_match_val icmp_code[BGP_PBR_MATCH_VAL_MAX];
struct bgp_pbr_match_val packet_length[BGP_PBR_MATCH_VAL_MAX];
struct bgp_pbr_match_val dscp[BGP_PBR_MATCH_VAL_MAX];
+ struct bgp_pbr_match_val flow_label[BGP_PBR_MATCH_VAL_MAX];
struct bgp_pbr_match_val tcpflags[BGP_PBR_MATCH_VAL_MAX];
struct bgp_pbr_match_val fragment[BGP_PBR_MATCH_VAL_MAX];
struct bgp_pbr_config {
struct bgp_pbr_interface_head ifaces_by_name_ipv4;
bool pbr_interface_any_ipv4;
+ struct bgp_pbr_interface_head ifaces_by_name_ipv6;
+ bool pbr_interface_any_ipv6;
};
extern struct bgp_pbr_config *bgp_pbr_cfg;
uint32_t type;
uint32_t flags;
+ uint8_t family;
uint16_t pkt_len_min;
uint16_t pkt_len_max;
uint8_t dscp_value;
uint8_t fragment;
uint8_t protocol;
+ uint16_t flow_label;
vrf_id_t vrf_id;
bool install_in_progress;
uint32_t refcnt;
struct bgp *bgp;
+ afi_t afi;
};
extern struct bgp_pbr_rule *bgp_pbr_rule_lookup(vrf_id_t vrf_id,
void bgp_pbr_print_policy_route(struct bgp_pbr_entry_main *api);
-struct bgp_node;
struct bgp_path_info;
-extern void bgp_pbr_update_entry(struct bgp *bgp, struct prefix *p,
+extern void bgp_pbr_update_entry(struct bgp *bgp, const struct prefix *p,
struct bgp_path_info *new_select, afi_t afi,
safi_t safi, bool nlri_update);
extern struct bgp_pbr_interface *bgp_pbr_interface_lookup(const char *name,
struct bgp_pbr_interface_head *head);
-extern int bgp_pbr_build_and_validate_entry(struct prefix *p,
+extern int bgp_pbr_build_and_validate_entry(const struct prefix *p,
struct bgp_path_info *path,
struct bgp_pbr_entry_main *api);
#endif /* __BGP_PBR_H__ */