Page MenuHomeFreeBSD

tests/netinet: add few tests for sending a broadcast packet
ClosedPublic

Authored by glebius on Feb 17 2025, 11:37 PM.
Tags
None
Referenced Files
F167851085: D49040.id151326.diff
Tue, Aug 25, 12:19 AM
F167848993: D49040.diff
Mon, Aug 24, 11:57 PM
F167826287: D49040.id151271.diff
Mon, Aug 24, 7:44 PM
F167805363: D49040.diff
Mon, Aug 24, 4:42 PM
Unknown Object (File)
Mon, Aug 24, 12:32 PM
Unknown Object (File)
Sat, Aug 22, 3:36 PM
Unknown Object (File)
Sat, Aug 22, 3:08 PM
Unknown Object (File)
Sat, Aug 22, 12:30 PM

Details

Summary
  1. Set SO_BROADCAST and send to INADDR_BROADCAST. This one is broken since at least FreeBSD 6.0, see bug 99558. Today it sends packet to a non-broadcast link level address.
  2. Set SO_BROADCAST, set IP_ONESBCAST and send to local broadcast address.
  3. Set SO_BROADCAST and send to local broadcast address.

For each test we bind a second socket to check whether the broadcast
is actually received.

PR: 99558

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Feb 18 2025, 9:27 PM

Make IP_ONESBCAST test more sophisticated: on machines with more interfaces
do more testing.

This revision now requires review to proceed.Feb 20 2025, 10:08 PM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 22 2025, 2:13 AM
This revision was automatically updated to reflect the committed changes.