mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 15:30:02 +00:00
bgpd, lib: share flags values for iptable configuration
Those flags can be shared between BGP and Zebra. That is why those flags are moved to common pbr.h header file. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
dc993e76e3
commit
2e1f721e65
@ -21,6 +21,7 @@
|
||||
#include "prefix.h"
|
||||
#include "zclient.h"
|
||||
#include "jhash.h"
|
||||
#include "pbr.h"
|
||||
|
||||
#include "bgpd/bgpd.h"
|
||||
#include "bgpd/bgp_pbr.h"
|
||||
|
@ -178,12 +178,6 @@ struct bgp_pbr_match {
|
||||
*/
|
||||
uint32_t type;
|
||||
|
||||
#define MATCH_IP_SRC_SET (1 << 0)
|
||||
#define MATCH_IP_DST_SET (1 << 1)
|
||||
#define MATCH_PORT_SRC_SET (1 << 2)
|
||||
#define MATCH_PORT_DST_SET (1 << 3)
|
||||
#define MATCH_PORT_SRC_RANGE_SET (1 << 4)
|
||||
#define MATCH_PORT_DST_RANGE_SET (1 << 5)
|
||||
uint32_t flags;
|
||||
|
||||
uint16_t pkt_len_min;
|
||||
|
10
lib/pbr.h
10
lib/pbr.h
@ -103,6 +103,16 @@ struct pbr_rule {
|
||||
| TCP_HEADER_RST | TCP_HEADER_PSH \
|
||||
| TCP_HEADER_ACK | TCP_HEADER_URG)
|
||||
|
||||
/* Pbr IPTable defines
|
||||
* those are common flags shared between BGP and Zebra
|
||||
*/
|
||||
#define MATCH_IP_SRC_SET (1 << 0)
|
||||
#define MATCH_IP_DST_SET (1 << 1)
|
||||
#define MATCH_PORT_SRC_SET (1 << 2)
|
||||
#define MATCH_PORT_DST_SET (1 << 3)
|
||||
#define MATCH_PORT_SRC_RANGE_SET (1 << 4)
|
||||
#define MATCH_PORT_DST_RANGE_SET (1 << 5)
|
||||
|
||||
extern int zapi_pbr_rule_encode(uint8_t cmd, struct stream *s,
|
||||
struct pbr_rule *zrule);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user