Description of problem: ifup-ipsec fails due to an invalid keylength error. Version-Release number of selected component (if applicable): How reproducible: Reproducible by sourcing an config file, in my case . /etc/sysconfig/networking-scripts/ifcfg-IPSec, and to evaluate the output of every single line. Feeding this info into setkey -c results in an error message invalid keylength. Steps to Reproduce: 1.# . /etc/sysconfig/network-scripts/ifcfg-IPSec 2.# echo ${KEY_ESP_IN:+add $DST $SRC esp $SPI_ESP_IN -E ${ESP_PROTO_IN:-$ESP_PROTO} $(echo '"')$KEY_ESP_IN$(echo '"');} 3.# setkey -c add 192.168.65.237 192.168.5.2 esp 0x201 -E 3des-cbc "0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831"; Actual results: 400 192 192 line 1: Invalid key length at [0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c83 1] Expected results: Silent acceptence of the command Additional info: Note the following does work: 1.# . /etc/sysconfig/network-scripts/ifcfg-IPSec 2.# echo ${KEY_ESP_IN:+add $DST $SRC esp $SPI_ESP_IN -E ${ESP_PROTO_IN:-$ESP_PROTO} $(echo '"')$KEY_ESP_IN$(echo '"');} 3.# setkey -c add 192.168.65.237 192.168.5.2 esp 0x201 -E 3des-cbc 0x7aeaca3f87d060a12f4a4487d5a5c3355920fae69a96c831;
Just in case the difference between the two commands is not clear I would like to mention that the working example doesn't have the surrounding quotes.
*** This bug has been marked as a duplicate of 150552 ***