From 92efc01270675a3524a29a8e909fa1fdaeebed75 Mon Sep 17 00:00:00 2001 From: Ze Gan Date: Sat, 9 Apr 2022 13:26:40 +0800 Subject: [PATCH] [docker-ptf]: Upgrade scapy to 2.4.5 in docker-ptf (#10507) Why I did it Existing dataplane tests cannot be tested under MACsec environment due to the traffic under MACsec link is encrypted. So, I will override the dp_poll of ptf to MACsec dp_poll to decrypt the MACsec packets on injected ports (PR: Azure/sonic-mgmt#5490). MACsec decryption library depends on scapy 2.4.5. How I did it Upgrade scapy library to 2.4.5 by pip. How to verify it Check the scapy version in docker-ptf by python -c "import scapy; print(scapy.__version__)" 2.4.5 Signed-off-by: Ze Gan --- dockers/docker-ptf/Dockerfile.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dockers/docker-ptf/Dockerfile.j2 b/dockers/docker-ptf/Dockerfile.j2 index d999d01e0026..21a96288a62f 100644 --- a/dockers/docker-ptf/Dockerfile.j2 +++ b/dockers/docker-ptf/Dockerfile.j2 @@ -119,7 +119,8 @@ RUN rm -rf /debs \ && pip install pyrasite \ && mkdir -p /opt \ && cd /opt \ - && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py + && wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \ + && pip install --upgrade --ignore-installed scapy==2.4.5 ## Adjust sshd settings RUN mkdir /var/run/sshd \