Skip to content

[dhcp-pkt-fwd] The src port and dst port of Relayed Packet are both 67#2432

Merged
wangxin merged 1 commit intosonic-net:masterfrom
irene-pan1202:dhcp_pkt_fwd
Nov 9, 2020
Merged

[dhcp-pkt-fwd] The src port and dst port of Relayed Packet are both 67#2432
wangxin merged 1 commit intosonic-net:masterfrom
irene-pan1202:dhcp_pkt_fwd

Conversation

@irene-pan1202
Copy link
Contributor

@irene-pan1202 irene-pan1202 commented Oct 30, 2020

Description of PR

Summary: The src port and dst port of Relayed Packet are both 67
Fixes # (issue)

Type of change

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

Approach

What is the motivation for this PR?

The failure I encounter is in the broadcom AS7726-32X platform, and the root cause is the dhcp packet which contains src port 68 and dst port 67 will be trap to CPU and not forward.

How did you do it?

How did you verify/test it?

Any platform specific information?

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

Documentation

@yxieca
Copy link
Collaborator

yxieca commented Oct 30, 2020

@irene-pan1202 can you fill the PR template with the request information? Particularly, explain why you made this change?

@yxieca yxieca requested a review from tahmed-dev October 30, 2020 16:24
@tahmed-dev
Copy link
Contributor

Thanks @irene-pan1202 , can you please reference this excerpt from rfc:2131

     4.7.2 Relay Agent Port Usage
     
        Relay agents should use port 67 as the source port number.  Relay
        agents always listen on port 67, but port 68 has sometimes been used
        as the source port number probably because it was copied from the
        source port of the incoming packet.
     
        Cable modem vendors would like to install filters blocking outgoing
        packets with source port 67.
     
        RECOMMENDATIONS:
     
        O  Relay agents MUST use 67 as their source port number.
     
        O  Relay agents MUST NOT forward packets with non-zero giaddr
           unless the source port number on the packet is 67.

if I recall correctly, the behavior here matched the captured packets from relay agent. I am reluctant to whether stick with the standard or stick with the dhcrelay behavior.

@irene-pan1202
Copy link
Contributor Author

@tahmed-dev May I ask what scenario of this test case be ? Relay agent <--> device <--> DHCP server, or DHCP client <--> device <--> DHCP server
from the packet content, it looks like to test Relay agent <--> DHCP server, but the UDP port it used is for client <--> server scenario?

@tahmed-dev
Copy link
Contributor

@tahmed-dev May I ask what scenario of this test case be ? Relay agent <--> device <--> DHCP server, or DHCP client <--> device <--> DHCP server
from the packet content, it looks like to test Relay agent <--> DHCP server, but the UDP port it used is for client <--> server scenario?

Thanks @irene-pan1202 it is the first scenario and so, I agree it should be port 67 (server port) only.

Copy link
Contributor

@tahmed-dev tahmed-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @irene-pan1202 . lgtm

@wangxin wangxin merged commit 8d8c198 into sonic-net:master Nov 9, 2020
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Update sonic-swss submodule pointer to include the following:
* 8eea92e [202205][counters] Revert PR sonic-net#2432 for the buffer queue/pg counters improvement ([sonic-net#2462](sonic-net/sonic-swss#2462))
* 5d8636a [202205] Enhance orchagent and buffer manager in error handling (sonic-net#2414) ([sonic-net#2449](sonic-net/sonic-swss#2449))
* aa22237 [Everflow/ERSPAN] Set correct destination port and mac address when the nexthop is updated for ERSPAN mirror destination (sonic-net#2392) ([sonic-net#2455](sonic-net/sonic-swss#2455))
* 04ce7be check state_db for po before sending ARP/ND pkts (sonic-net#2444) ([sonic-net#2450](sonic-net/sonic-swss#2450))
* f0138a2 [portmgr] Fixed the orchagent crash due to late arrival of notif (sonic-net#2431) ([sonic-net#2451](sonic-net/sonic-swss#2451))
* 7cfde48 Change the log messages in addKernelNeigh/Route from ERROR to INFO ([sonic-net#2437](sonic-net/sonic-swss#2437))
* 2c5116e [202205][counters] Improve performance by polling only configured ports buffer queue/pg counters ([sonic-net#2432](sonic-net/sonic-swss#2432))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants