History

bpf: Improve bpf_redirect_neigh helper description

Follow-up to address David's feedback that we should better describe internals of the bpf_redirect_neigh() helper.

Daniel Borkmann committed 6 years ago

Commit dd2ce6a1 parent ac53a0d2 files · +14 −6Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/bpf.h+7−3
@@ -3679,10 +3679,14 @@ union bpf_attr { · 3678 unmodified lines
36793679 * Redirect the packet to another net device of index *ifindex*
36803680 * and fill in L2 addresses from neighboring subsystem. This helper
36813681 * is somewhat similar to **bpf_redirect**\ (), except that it
3682− * fills in e.g. MAC addresses based on the L3 information from
3683− * the packet. This helper is supported for IPv4 and IPv6 protocols.
3682+ * populates L2 addresses as well, meaning, internally, the helper
3683+ * performs a FIB lookup based on the skb's networking header to
3684+ * get the address of the next hop and then relies on the neighbor
3685+ * lookup for the L2 address of the nexthop.
3686+ *
36843687 * The *flags* argument is reserved and must be 0. The helper is
3685− * currently only supported for tc BPF program types.
3688+ * currently only supported for tc BPF program types, and enabled
3689+ * for IPv4 and IPv6 protocols.
36863690 * Return
36873691 * The helper returns **TC_ACT_REDIRECT** on success or
36883692 * **TC_ACT_SHOT** on error.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t