mirror of
				https://github.com/Telecominfraproject/ols-nos.git
				synced 2025-10-30 17:48:09 +00:00 
			
		
		
		
	[iproute2]: Fix format error of SSCI (#10767)
Signed-off-by: Ze Gan <ganze718@gmail.com> #### Why I did it The SSCI is wrong in the output of MACsec so that the virtual SAI cannot parse the output corretly. The wrong output: ``` 142: macsec_eth1: protect on validate strict sc off sa off encrypt on send_sci on end_station off scb off replay off cipher suite: GCM-AES-XPN-256, using ICV length 16 TXSC: 5254008f4f1c0001 on SA 0 0: PN 103, state on, key 12cbc4b64e26c9a1ba14d810da20d16e SSCI 33554432, RXSC: 525400edac5b0001, state on 0: PN 107, state on, key 12cbc4b64e26c9a1ba14d810da20d16e offload: off ``` Expected ``` 142: macsec_eth1: protect on validate strict sc off sa off encrypt on send_sci on end_station off scb off replay off cipher suite: GCM-AES-XPN-256, using ICV length 16 TXSC: 5254008f4f1c0001 on SA 0 0: PN 252, state on, SSCI 33554432, key 12cbc4b64e26c9a1ba14d810da20d16e RXSC: 525400edac5b0001, state on 0: PN 264, state on, key 12cbc4b64e26c9a1ba14d810da20d16e ``` #### How I did it Move SSCI before the key so that SSCI will not be the front of SC information.
This commit is contained in:
		| @@ -182,11 +182,11 @@ index 18289ecd..1df19bf1 100644 | |||||||
|  		print_bool(PRINT_JSON, "active", NULL, state); |  		print_bool(PRINT_JSON, "active", NULL, state); | ||||||
|  		print_string(PRINT_FP, NULL, |  		print_string(PRINT_FP, NULL, | ||||||
|  			     " state %s,", state ? "on" : "off"); |  			     " state %s,", state ? "on" : "off"); | ||||||
|  		print_key(sa_attr[MACSEC_SA_ATTR_KEYID]); |  | ||||||
| +		if (sa_attr[MACSEC_SA_ATTR_SSCI]) { | +		if (sa_attr[MACSEC_SA_ATTR_SSCI]) { | ||||||
| +			print_uint(PRINT_ANY, "ssci", " SSCI %u,", | +			print_uint(PRINT_ANY, "ssci", " SSCI %u,", | ||||||
| +				rta_getattr_u32(sa_attr[MACSEC_SA_ATTR_SSCI])); | +				rta_getattr_u32(sa_attr[MACSEC_SA_ATTR_SSCI])); | ||||||
| +		} | +		} | ||||||
|  |  		print_key(sa_attr[MACSEC_SA_ATTR_KEYID]); | ||||||
|   |   | ||||||
|  		print_txsa_stats(prefix, sa_attr[MACSEC_SA_ATTR_STATS]); |  		print_txsa_stats(prefix, sa_attr[MACSEC_SA_ATTR_STATS]); | ||||||
|  		close_json_object(); |  		close_json_object(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Ze Gan
					Ze Gan