Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[arp_responder] Fix error in generate_neigh_adv #9337

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

yaqiangz
Copy link
Contributor

@yaqiangz yaqiangz commented Aug 8, 2023

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

Missing part of this PR: #8697 would causes error while replying ndp.

root:/tmp# /root/env-python3/bin/python3 /opt/arp_responder.py -e
Traceback (most recent call last):
  File "/opt/arp_responder.py", line 134, in <module>
    main()
  File "/opt/arp_responder.py", line 130, in main
    scapy.sniff(prn=ARPResponder.action, filter="arp or icmp6", iface=list(ip_sets.keys()), store=False)
  File "/root/env-python3/lib/python3.7/site-packages/scapy/sendrecv.py", line 1311, in sniff
    sniffer._run(*args, **kwargs)
  File "/root/env-python3/lib/python3.7/site-packages/scapy/sendrecv.py", line 1254, in _run
    session.on_packet_received(p)
  File "/root/env-python3/lib/python3.7/site-packages/scapy/sessions.py", line 109, in on_packet_received
    result = self.prn(pkt)
  File "/opt/arp_responder.py", line 20, in action
    return ARPResponder.reply_to_ndp(packet)
  File "/opt/arp_responder.py", line 65, in reply_to_ndp
    remote_mac, request_ip, remote_ip)
TypeError: generate_neigh_adv() missing 1 required positional argument: 'remote_ip'

How did you do it?

Remove useless parameter.

How did you verify/test it?

Run this script to reply ndp.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@yaqiangz
Copy link
Contributor Author

yaqiangz commented Aug 8, 2023

@saiarcot895 Could you pls help to review this PR?

@yaqiangz yaqiangz merged commit f5a7426 into sonic-net:master Aug 9, 2023
12 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Aug 9, 2023
What is the motivation for this PR?
Missing part of this PR: sonic-net#8697 would causes error while replying ndp.

How did you do it?
Remove useless parameter.

How did you verify/test it?
Run this script to reply ndp.

Signed-off-by: Yaqiang Zhu <[email protected]>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #9351

mssonicbld pushed a commit that referenced this pull request Aug 9, 2023
What is the motivation for this PR?
Missing part of this PR: #8697 would causes error while replying ndp.

How did you do it?
Remove useless parameter.

How did you verify/test it?
Run this script to reply ndp.

Signed-off-by: Yaqiang Zhu <[email protected]>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Jan 25, 2024
What is the motivation for this PR?
Missing part of this PR: sonic-net#8697 would causes error while replying ndp.

How did you do it?
Remove useless parameter.

How did you verify/test it?
Run this script to reply ndp.

Signed-off-by: Yaqiang Zhu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants