diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2018-06-12 18:26:35 +0200 | 
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2018-06-28 08:52:15 +0200 | 
| commit | 01ffd28b8d4aae9e178257ef7d99a7e1fafc335b (patch) | |
| tree | 1a09f6695f09d7530ea6fd8ebbb20813fb26dfc6 /bgpd/bgp_flowspec_util.c | |
| parent | 0e867886a7a0dc768a4ceb947ccb32f32ec4d49d (diff) | |
bgpd: fix display with flowspec tcp flags option
When displaying RIB FS summary, the TCP option is not displayed.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd/bgp_flowspec_util.c')
| -rw-r--r-- | bgpd/bgp_flowspec_util.c | 27 | 
1 files changed, 14 insertions, 13 deletions
diff --git a/bgpd/bgp_flowspec_util.c b/bgpd/bgp_flowspec_util.c index 956cf28c21..db85c642aa 100644 --- a/bgpd/bgp_flowspec_util.c +++ b/bgpd/bgp_flowspec_util.c @@ -348,32 +348,33 @@ int bgp_flowspec_tcpflags_decode(enum bgp_flowspec_util_nlri_t type,  		case BGP_FLOWSPEC_RETURN_STRING:  			if (op[1] == 1 && loop != 0) {  				len_written = snprintf(ptr, len_string, -						       ", and "); +						       ",&");  				len_string -= len_written;  				ptr += len_written;  			} else if (op[1] == 0 && loop != 0) {  				len_written = snprintf(ptr, len_string, -						      ", or "); +						      ",|");  				len_string -= len_written;  				ptr += len_written;  			} -			len_written = snprintf(ptr, len_string, -					       "tcp flags is "); -			len_string -= len_written; -			ptr += len_written; -			if (op[6] == 1) { -				ptr += snprintf(ptr, len_string, -					       "not "); +			if (op[7] == 1) { +				len_written = snprintf(ptr, len_string, +					       "= "); +				len_string -= len_written; +				ptr += len_written; +			} else { +				len_written = snprintf(ptr, len_string, +						       "∋ ");  				len_string -= len_written;  				ptr += len_written;  			} -			if (op[7] == 1) { -				ptr += snprintf(ptr, len_string, -					       "exactly match "); +			if (op[6] == 1) { +				len_written = snprintf(ptr, len_string, +					       "! ");  				len_string -= len_written;  				ptr += len_written;  			} -			ptr += snprintf(ptr, len_string, +			len_written = snprintf(ptr, len_string,  				       "%d", value);  			len_string -= len_written;  			ptr += len_written;  | 
