Skip to content

dhcp-relay: Handle client requests #8

@yoelcaspersen

Description

@yoelcaspersen

Initial checks:

  • Destination MAC = FF:FF:FF:FF:FF:FF
  • Destination IP = 255.255.255.255
  • UDP destination port = 67
  • OP == 1
  • If hops > 16: Discard packet
  • If option 82 is set, discard

Modify packet:

  • Increment "hops" field
  • If GIADDR == 0, set GIADDR = relay agent IP
  • Add option 82 (use VLAN tags and interface name)
  • Set source IP = relay agent IP
  • Set destination IP = DHCP server IP
  • Set destination MAC = relay agent MAC
  • Re-calc IP checksum

Final action:

  • Return XDP_PASS (pass on to kernel)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions