diff options
| author | Marcin Matląg <marcin.matlag@blackice.com.pl> | 2019-06-05 22:56:11 +0200 | 
|---|---|---|
| committer | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2019-09-03 15:30:10 -0500 | 
| commit | 95a9fe025a2052a05150a450f423f9731127294b (patch) | |
| tree | 6231d22b490ce020e79afc56b0bd0e4b7096f9af /pbrd/pbr_map.c | |
| parent | a3aea4ebaf9edd9aa44ca3a85153c3c82109213c (diff) | |
pbrd: initial fwmark support for pbr matches #4460
Adds support to specify marks in pbr-map match clause.
Marks should be provided as decimal (unsigned int).
Currently supported on Linux only. Attempting to configure
marks on other platform will result in:
"pbr marks are not supported on this platform"
Signed-off-by: Marcin Matlag <marcin.matlag@gmail.com>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Diffstat (limited to 'pbrd/pbr_map.c')
| -rw-r--r-- | pbrd/pbr_map.c | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/pbrd/pbr_map.c b/pbrd/pbr_map.c index 5e67990d5e..1a8461c6c1 100644 --- a/pbrd/pbr_map.c +++ b/pbrd/pbr_map.c @@ -316,7 +316,7 @@ struct pbr_map_sequence *pbrms_get(const char *name, uint32_t seqno)  		pbrms->ruleno = pbr_nht_get_next_rule(seqno);  		pbrms->parent = pbrm;  		pbrms->reason = -			PBR_MAP_INVALID_SRCDST | +			PBR_MAP_INVALID_EMPTY |  			PBR_MAP_INVALID_NO_NEXTHOPS;  		QOBJ_REG(pbrms, pbr_map_sequence); @@ -350,10 +350,10 @@ pbr_map_sequence_check_nexthops_valid(struct pbr_map_sequence *pbrms)  	}  } -static void pbr_map_sequence_check_src_dst_valid(struct pbr_map_sequence *pbrms) +static void pbr_map_sequence_check_not_empty(struct pbr_map_sequence *pbrms)  { -	if (!pbrms->src && !pbrms->dst) -		pbrms->reason |= PBR_MAP_INVALID_SRCDST; +	if (!pbrms->src && !pbrms->dst && !pbrms->mark) +		pbrms->reason |= PBR_MAP_INVALID_EMPTY;  }  /* @@ -364,7 +364,7 @@ static void pbr_map_sequence_check_valid(struct pbr_map_sequence *pbrms)  {  	pbr_map_sequence_check_nexthops_valid(pbrms); -	pbr_map_sequence_check_src_dst_valid(pbrms); +	pbr_map_sequence_check_not_empty(pbrms);  }  static bool pbr_map_check_valid_internal(struct pbr_map *pbrm)  | 
