Skip to content

Commit 55b3bde

Browse files
zignisdylandreimerink
authored andcommitted
fix typo
1 parent a427547 commit 55b3bde

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/linux/map-type/BPF_MAP_TYPE_SOCKMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The socket map is a specialized map type which hold network sockets as value.
1212

1313
## Usage
1414

15-
This map type can be use too lookup a pointer to a socket with the [`bpf_map_lookup_elem`](../helper-function/bpf_map_lookup_elem.md) helper function, which then can be passed to helpers such as [`bpf_sk_assign`](../helper-function/bpf_sk_assign.md) or the a map reference can be used directly in a range of helpers such as [`bpf_sk_redirect_map`](../helper-function/bpf_sk_redirect_map.md), [`bpf_msg_redirect_map`](../helper-function/bpf_msg_redirect_map.md) and [`bpf_sk_select_reuseport`](../helper-function/bpf_sk_select_reuseport.md). All of the above cases redirect a packet or connection in some way, the details differ depending on the program type and the helper function, so please visit the specific pages for details.
15+
This map type can be used to lookup a pointer to a socket with the [`bpf_map_lookup_elem`](../helper-function/bpf_map_lookup_elem.md) helper function, which then can be passed to helpers such as [`bpf_sk_assign`](../helper-function/bpf_sk_assign.md) or the a map reference can be used directly in a range of helpers such as [`bpf_sk_redirect_map`](../helper-function/bpf_sk_redirect_map.md), [`bpf_msg_redirect_map`](../helper-function/bpf_msg_redirect_map.md) and [`bpf_sk_select_reuseport`](../helper-function/bpf_sk_select_reuseport.md). All of the above cases redirect a packet or connection in some way, the details differ depending on the program type and the helper function, so please visit the specific pages for details.
1616

1717
!!! note
1818
Sockets returned by `bpf_map_lookup_elem` are ref-counted, so the caller must call [`bpf_sk_release`](../helper-function/bpf_sk_release.md) in all code paths where the returned socket is not NULL before exiting the program. This is enforced by the verifier which will throw a `Unreleased reference` error if socket pointers are not released.

0 commit comments

Comments
 (0)