On 08/12/2021 11:01, David Ahern wrote:
On 12/6/21 11:05 PM, lizhijian@fujitsu.com wrote:
################################################################# With VRF
TEST: Raw socket bind to local address - ns-A IP [ OK ] TEST: Raw socket bind to local address after device bind - ns-A IP [ OK ] TEST: Raw socket bind to local address after VRF bind - ns-A IP [ OK ] TEST: Raw socket bind to local address - VRF IP [FAIL]
i found that above case failed with "server: error binding socket: 99: Cannot assign requested address" i have manually check it with below command after setup(), same errors:
# ip netns exec ns-A nettest -s -R -P icmp -l 172.16.3.1 -b 05:55:11 server: error binding socket: 99: Cannot assign requested address
But when i specified specific network interface, it works # ip netns exec ns-A nettest -s -R -P icmp -l 172.16.3.1 -b -I red # echo $? 0 # ip netns exec ns-A nettest -s -R -P icmp -l 172.16.3.1 -b 06:01:55 server: error binding socket: 99: Cannot assign requested address # echo $? 1
So i wonder if i missed something ?
That test should be a negative test as is the first one in that group - in both cases the address bind should fail since the socket is not in the VRF but the address is. The first on currently shows "OK" but that is because of 5cad8bce26e01 that made changes to the config to validate MD5 changes. Will send a patch to fix.
Got it, thanks a lot for your help. I'm looking forward to it :)
Thanks Zhijian