Bug 100081 - sll_family required for bind() on AF_PACKET socket
Summary: sll_family required for bind() on AF_PACKET socket
Status: RESOLVED PATCH_ALREADY_AVAILABLE
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-17 22:34 UTC by janh
Modified: 2015-06-18 06:42 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description janh 2015-06-17 22:34:15 UTC
This is from "man 7 packet":
>When you send packets it is enough to specify sll_family, sll_addr, sll_halen,
>sll_ifindex.  The other fields should be 0. sll_hatype and sll_pkttype are set
>on received packets for your information. For bind only sll_protocol and
>sll_ifindex are used.

However, the last sentence is not correct. You have to specifiy sll_family for bind() too, otherwise it will fail.
Comment 1 Michael Kerrisk 2015-06-18 06:42:51 UTC
By chance, this was actually reported and fixed a few weeks ago, and the text that will appear in the next man-pages release is:

       Fields used for binding are sll_family (should be
       AF_PACKET), sll_protocol, and sll_ifindex.

Note You need to log in before you can comment on or make changes to this bug.